1. 测试是否允许远程连接

$ telnet 192.168.1.8 3306
host 192.168.1.4 is not allowed to connect to this mysql server

2. 允许特定客户端 ip 地址连接
$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'mysql-root-password'; 

mysql> FLUSH PRIVILEGES;
注意:mysql-root-password 服务器 mysql 的密码

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2021-05-17
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
相关资源
相似解决方案