1.修改密码
ALTER user 'root'@'localhost' IDENTIFIED BY 'password'
2.开启远程连接
mysql> use mysql;
Database changed
mysql> grant all privileges on *.* to root@'%' identified by "password";
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
网友评论