进入到 mysql 命令行下,执行如下命令:
#进入到 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;
PHP
进入到 mysql 命令行下,执行如下命令:
#进入到 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;
PHP