1 MySQL的Client does not support authentication protocol requested by server
解决:
在开始菜单的MySQL文件夹里打开"MySQL Command Line Client",输入root的密码登陆MYSQL服务器的root用户,然后再mysql>命令行后面输入:
set password for user@"localhost"=old_password('yourPassword');
然后按回车就可以解决问题了
其中user改为你的要使用的那个用户名;localhost改为你的主机名,一般情况下是localhost;youPassword改为你那个用户的密码。
比如我有一个zhangsan用户,密码为12345,主机为localhost,则输入的内容为:
set password for zhangsan@"localhost"=old_password('12345');
2 xx.xx.xx.xx is not allowed to connect to this mysql server
解决:
进入mysql,创建一个新用户xuys:
格式:grant 权限 on 数据库名.表名 用户@登录主机 identified by "用户密码";
grant select,update,insert,delete on *.* to abc@192.168.88.234 identified by "pass";
查看结果,执行:
use mysql;
select host,user,password from user;
可以看到在user表中已有刚才创建的xuys用户。host字段表示登录的主机,其值可以用IP,也可用主机名,
将host字段的值改为%就表示在任何客户端机器上能以xuys用户登录到mysql服务器,建议在开发时设为%。
update user set host = '%' where user = abc;