允许MySQL中root账户的远程登录

1、root登录mysql之后,查看端口,确认是3306

show variables like ‘port‘;

2、添加root@%用户并设置密码为123456

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";

如果出现这样的错误:

The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决方法:flush privileges;

 3、查看用户列表

use mysql;

select host,user,password from user;

 

Done!

 

允许MySQL中root账户的远程登录,布布扣,bubuko.com

允许MySQL中root账户的远程登录

上一篇:使用aforg.net 录制摄像头 附源码


下一篇:js堆栈溢出错误