can‘t connect to MySQL server on ‘localhost‘(10038)
程序员文章站
2022-05-01 21:52:01
...
项目搭建是在宝塔上,数据库在linux上是可以连接的,包括云服务器安全组3306端口也是开启着的。但远程连接Mysql服务报can't connect to MySQL server on 'localhost'(10038)错误。
解决办法:查看linux服务器上防火墙是否关闭:若处于关闭状态,开启后再关闭即可连接。
原理:
宝塔应用程序获取的只是linux防火墙的数据,其无法对服务器的状态进行获取,所以宝塔拿到数据后是默认开启防火墙的。
推荐阅读
-
Linux登录MySQL时出现 Can't connect to local MySQL server through socket '/tmp/mysql.sock'解决方法
-
连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
-
MYSQL ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.210' (111) 解决方法
-
MySQL连接错误:Can't connect to MySQL server on'localhost' (10055)
-
MySQL错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 的解决办法
-
windows 连接 linux 上的mysql出现Can't connect to; is not allowed to connect;Access denied for user
-
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)解决办法
-
Can't connect to local MySQL server through socket
-
Can't connect to MySQL server on 'localhost' (10061)问题描述及解决办法
-
MySQL问题记录——2003-Can't connect to MySQL server on 'localhost'(10038)