how to understand “can't connect” mysql error messages?

后端 未结 6 864
Happy的楠姐
Happy的楠姐 2021-01-18 19:40

I have the following error message:

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

How would I

6条回答
  •  Happy的楠姐
    2021-01-18 20:12

    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.)

提交回复
热议问题