【MySql 】is not allowed to connect to this MySql server 无法访问远程MySQL数据库

问题:访问远程MySQL数据库时报错【is not allowed to connect to this MySql server 】不允许访问,因为MySQL默认只有本机localhost能够访问MySQL Server服务。

开放MySQL服务给其他主机访问

在Navicat中查看当前数据库User用户表,可见默认的用户都是localhost,即只允许本机访问。

现在想要开放给其他主机访问,如果一个一个添加用户并设置权限的话太麻烦,最简单的办法是把localhost改为通配符%,然后重启服务即可。

 

原文地址:https://www.cnblogs.com/guxin/p/mysql-is-not-allowed-to-connect-to-this-mysql-server.html