mysql8.0.15修改密码,开启远程连接

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)

你可能感兴趣的:(mysql8.0.15修改密码,开启远程连接)