今天在linux上面配置了一个mysql数据库,为了管理方便,我在mysql.com上面选择一个Mysql GUI的工具,来从windows端用图形的方式管理mysql。结果发现了一个问题,现在已经完全解决掉了,把前后原因记录于此。
具体操作及出错情况如下:
D:\mysql5\bin>mysql -h 192.168.0.197 -u root -p
Enter password: ********
ERROR 1130 (00000): Host '192.168.0.197
' is not allowed to connect to this MySQL ser
ver
D:\mysql5\bin>
192.9.100.50是我本机的ip,'192.168.0.197
'是我机器的名字。ERROR 1130 (00000)怎么解决呢?我的mysql是解压zip安装的。
可是下面这样操作又对着呢,为什么?
D:\mysql5\bin>mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.9-beta
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>解决方法:
mysql>grant all on *.* to root@'%' identified by 'yourpassword';
mysql>flush privileges; //然后刷新权限