通过HeidiSQL连接MYSQL数据库报错:

SQL Error (1130): Host '192.168.1.100' is not allowed to connect to this MySQL server

说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。

需更改 mysql 数据库里的 user表里的 host项
把localhost改称%

首先按下面的步骤登录Mysql服务器

mysql>use mysql;

mysql>update user set host = '%'  where user ='root';

mysql>flush privileges;

mysql>select 'host','user' from user where user='root';

mysql>quit

OK。远程连接成功! 注意远程登录关闭防火墙

 

相关文章:

  • 2022-01-10
  • 2021-09-27
  • 2021-04-12
  • 2021-08-29
  • 2021-10-24
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
相关资源
相似解决方案