默认情况下Mysql只允许本地登录,所以需要修改配置文件将地址绑定给注释掉:

vim /etc/mysql/my.cnf

# Instead of skip-networking the default is now to listen onlyon
# localhost which is more compatible and is not less secure.
#bind-address 
         = 127.0.0.1 <---注释掉这一行就可以远程登录了
ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111)

ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111)

相关文章:

  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2021-06-12
  • 2021-11-03
相关资源
相似解决方案