Linux Mysql 1130错误解决
时间:2022-03-10 17:19
今天在win32下通过navicat 远程登录Mysql时出现如下错误: 想都不用想,肯定是Mysql的访问权限问题。 首先,通过终端(我用的是SSH)远程登录到Linux服务器,为了安全起见,先改一下Mysql数据的root用户密码: ?
[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>
|
[plain]
mysql> update
` user ` set
`host` = ‘%‘
where ` user ` = ‘root‘ ;
mysql> flush privileges ;
|
测试一下,如图: 操作成功,现在,你可以通过终端远程管理mysql数据库了。
Linux Mysql 1130错误解决,布布扣,bubuko.com