如何理解“无法连接" mysql错误信息? [英] how to understand "can't connect" mysql error messages?

查看:134
本文介绍了如何理解“无法连接" mysql错误信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误消息:

SQLSTATE [HY000] [2003]无法连接到MySQL服务器 '192.168.50.45'(4)

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '192.168.50.45' (4)

我将如何解析(我有HY000,我有2003,我有(4).

How would I parse this (I have HY000, I have 2003 and I have the (4).

推荐答案

HY000是非常通用的ODBC级错误代码,并且connect()调用失败,错误代码为ECONNREFUSED,其值为111.)

HY000 is a very general ODBC-level error code, and 2003 is the MySQL-specific error code that means that the initial server connection failed. 4 is the error code from the failed OS-level call that the MySQL driver tried to make. (For example, on Linux you will see "(111)" when the connection was refused, because the connect() call failed with the ECONNREFUSED error code, which has a value of 111.)

这篇关于如何理解“无法连接" mysql错误信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆