1.mysql安装成功后,需要赋予权限给到需要远程的帐号
mysql> GRANT ALL ON *.* TO 'root'@'%';
ERROR 1410 (42000): You are not allowed to create a user with GRANT
会出现上述错误
这时需要把对于帐号的host开通出来
update user set host='%' where user='对应帐号';
这样就可以成功赋权
mysql> Grant all privileges on root.* to 'root'@'%';
Query OK, 0 rows affected (0.00 sec)
2.在使用远程连接或者是可视化工具连接时如果出现下述报错
1251-Client does not support authentication protocol requested by sever…
这是因为mysql8的加密方式和连接方式(Navicat)不一样
这时候需要
mysql> alter user 指定帐号 identified with mysql_native_password by '帐号的密码';
Query OK, 0 rows affected (0.01 sec)