Mysql8.0版本之前和之后远程登录设置

//mysql8.0版本之前的使用这个命令实现远程登录:
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘*********‘ WITH GRANT OPTION;
FLUSH PRIVILEGES;


//mysql 8.0版本以后需要使用这个命令实现远程登录
查看表中的数据:
SELECT User, mysql_native_password,Host FROM user;
修改远程登录的加密规则和用户密码:
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘********‘
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘********‘ PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;

Mysql8.0版本之前和之后远程登录设置

上一篇:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.


下一篇:SqlServer2008 安装提示重新启动计算机失败解决