centos6下安装mysql--二进制字节码方式
?想都不用想,肯定是Mysql的访问权限问题。?首先,通过终端(我用的是SSH)远程登录到Linux服务器,为了安全起见,先改一下Mysql数据的root用户密码:??1234567891011[plain]
[hadoop@h1 ~]$ mysqladmin -u root
password
123456?
[hadoop@h1 ~]$ mysql -uroot -p?
Enter
password
:?
Welcome
to
the MySQL monitor.? Commands
end
with
;
or
\g.?
Your MySQL
connection
id
is
13?
Server version: 5.0.77 Source distribution?
??
?Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear the buffer.?
??
?mysql>
??第二步,查询Mysql中所有用户的权限:??意料之中,mysql的root用户只能通过本机访问,下面我们来改一下权限:??123
[plain]
mysql>
update
`user
`
set
`host` =
'%'
where
`
user
` =
'root'
;?
mysql> flush
privileges
;
?
?注意: ?执行语句update
`user
`
set
`host` =
'%'
where
`
user
` =
'root'
;后可能会报这个错误:
Duplicate entry '%-root' for key 'PRIMARY',忽略即可。测试一下,如图:?