环境
OS: Ubuntu 20.04MySQL: 8.0.30
步骤
mysql -u rootmysql> use mysql;# 查看账号信息mysql> select user, host, authentication_string from user;# 设置任意 ip 可应用 root 连贯mysql> update user set host='%' where user='root';# 设置明码为 xxxxgrant all privileges on *.* to 'root'@'%' identified by 'xxxx' with grant option;
本文出自 qbit snap