安装结束后,用MySQL Front 连接MySQL服务器时,可能会出现如下错误:
“SQL执行错误#1130....”这种错误的原因是你没有给其他用户授权。
解决办法有两种:
第一种:在服务器端上连接上Mysql;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@'192.168.0.0/255.255.255.0' IDENTIFIED BY '123456';
mysql>FLUSH PRIVILEGES;
mysql>select User,Host,Password from mysql.user;
+------+---------------------------+-------------------------------------------+
| user | host | password |
+------+---------------------------+-------------------------------------------+
| root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | station31.example.com | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | 127.0.0.1 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | 192.168.0.0/255.255.255.0 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+---------------------------+-------------------------------------------+
出现红色字段类似的行,就可以了。接下来,用Mysql Front 登录你的Mysql服务器...
第二种:1.查看Linux防火墙是否关掉;
2.使用MySQL Front再次连接;
3.登录Mysql:
4.首先使用update把mysql.user中的root的host从localhost修改成%:
mysql> UPDATE mysql.user SET Host='%' WHERE Host='localhost' ;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%";
mysql> FLUSH PRIVILEGES ;
5.再次连接,显示成功。