linux新安装mysql后修改root密码以及允许外网访问

Published on with 539 views

linux新安装mysql后修改root密码以及允许外网访问

直接上代码

mysql -u root -p

enter your password 

use mysql;

update user set password=password('yournewpassword') where user='root';

flush privileges;

grant all on *.* to root@"%" identified by "yourpassword";

flush privileges;

Responses