
code
#进入到 mysql 环境下
mysql -uroot -ppassword;
use mysql;
update user set Host='%' where User='root';
flush privileges;
#或者
# grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
技术学习、经验分享

#进入到 mysql 环境下
mysql -uroot -ppassword;
use mysql;
update user set Host='%' where User='root';
flush privileges;
#或者
# grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;