【数据库领域】host 192.168.58.1 is not allowed to connect to this mysql server

在学习了linux环境下安装mysql后,通过命令创建了表。在linux宿主环境下,可以使用mysql 但是使用windws下的navicat去连接linux下的mysql数据库 一直包 host 192.168.58.1 is not allowed to connect to this mysql server。

通过查看linux环境下的3306端口 也开放了 

最终问题出现在没有对root用户进行远程权限设置。

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.58.1' IDENTIFIED BY 'root' WITH GRANT OPTION;

最终解决。

原文地址:https://www.cnblogs.com/qxlxi/p/12860798.html