1.进入MySQL
打开终端 输入
mysql -u root -p
提示输入密码
Enter password:
2.输入密码后进入MySQL
use mysql;
grant all privileges on *.* to 'root'@'%' identified by '#远程连接密码#' with grant option;
3.刷新,生效命令
flush privileges;
4.查看是是否成功
select host,user from user;
网友评论