记住:对授权表的任何修改都需要重新reload,即执行第3步。
如果经过以上3个步骤还是无法从客户端连接,请执行以下操作,在Mysql数据库的db表中插入一条记录:
use Mysql;
insert into db values("192.168.88.234","%","xuys","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y");
update db set host = "%" where user = "xuys";
重复执行上面的第2、3步。
方法三:
附加fbysss解决phpMyAdmin连接远程用户的方法:
1.用root账户登录远程Mysql服务器,
grant select,update,insert,delete on *.* to sss@192.168.0.114 identified by "sss";
update user set host = "%" where user = "sss";
退出Mysql,在shell下执行
#Mysqladmin -u root -p [password] reload
#Mysqladmin -u root -p [password] shutdown
#/etc/rc.d/init.d/Mysqld start
2.修改phpMyAdmin目录下的config.inc.php文件,找到
$cfg["Servers"][$i]["host"] 修改为远程服务器地址
$cfg["Servers"][$i]["user"] 修改为sss
$cfg["Servers"][$i]["password"]修改为sss的密码
要注意的是:grant all privilege并不能把“grant” 的权限赋给用户,如果要加,可以直接在Mysql中使用use Mysql;update user set Grant_priv ="Y"来达到要求。