Windows下通过Kitematic创建mysql instance
docker安装mysql 5.8以及root用户远程授权。
mysql5.8远程连接问题
修改密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'newpassword'; #更新一下用户的密码 root用户密码为newpassword
解决mysql5.8无法远程连接的问题
select host,user from user where user='root'; # 查看host,正常情况,host=localhost
update user set host='%' where user='root'; #更改host为所有ip
select host,user from user where user='root'; # 查看更改,此时 host=%
Error: 1251
Message: Client does not support authentication protocol requested by server; consider upgrading MySQL client
解决方法
USE mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的数据库密码';
FLUSH PRIVILEGES;