1,远程连接工具密码加密问题
解决Navicat for MySQL 连接 Mysql 8.0.11 出现1251- Client does not support authentication protocol 错误,如下更改密码加密方式,进入cmd
cd C:Program FilesMySQLMySQL Server 8.0in //找到sql安装文件目录 mysql -u root -p ///打开mysql ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER; //修改加密方式 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; //重置密码 FLUSH PRIVILEGES; //刷线权限
2,远程连接账号权限
Navicat for MySQl访问远程mysql数据库,出现报错,显示“1130 - Host'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server“。解决办法如下
use mysql; //进入数据库 select host,user from user; //查询表 update user set host = '%' where user = 'root'; //更改root权字段 flush privileges; //刷新权限