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)