MySQL8开启远程访问权限
连接到mysql,依次运行以下命令
mysql -u root -p
mysql> use mysql;
mysql> update user set host = '%' where user = 'root';
mysql> FLUSH PRIVILEGES;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> select host,user,plugin from user;
plugin需要是mysql_native_password