mysql远程访问
mysql> ALTER USER 'root'@'localhost' -> IDENTIFIED WITH mysql_native_password -> BY 'password'; Query OK, 0 rows affected (0.02 sec) mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysql'; Query OK, 0 rows affected (0.01 sec) mysql> use mysql; Database changed mysql> select host, user, authentication_string, plugin from user; mysql> grant all privileges on *.* to 'root'@'%'; ERROR 1410 (42000): You are not allowed to create a user with GRANT mysql> update user set host='%' where user ='root'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec)