90% of the time, this error is due either to the MySQL Server not running, or else firewall configuration on the Windows server blocking access on port 3306 (or whatever port your MySQL instance is configured to use).
Error: 2003 (CR_CONN_HOST_ERROR)
Message: Can’t connect to MySQL server on ‘%s’ (%d)
- 58If you get a too many connections error,Error: 1040 SQLSTATE: 08004 (ER_CON_COUNT_ERROR), when you try to connect to the mysqld server, this means that all available connections are in use by other clients. To increase the concurrent connections what are allowed to connect to the server, change the max_connections system…
- 58Error: 1045 SQLSTATE: 28000 (ER_ACCESS_DENIED_ERROR) Message: Access denied for user '%s'@'%s' (using password: %s) This occurs when the user has no access to database server and user is trying to connect the database server. Suggestions: Check the mysql user rights Check the database access rights Check the users IP
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2)54I tried the following steps: Log in as super user or use sudo Open /etc/mysql/my.cnf using gedit Check the all the configuration Find bind-address, and change its value to the database server host machine's IP address. For me, it was localhost or 127.0.0.1 Save and close the file. Come back…