Error code
MySQL 2003
MYSQL2003
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.
What it means
Can't connect to MySQL server on host — connection refused or host unreachable.
How to fix it
- Confirm MySQL is running and listening on the expected port with netstat -tlnp | grep 3306.
- Check firewall and security group rules to ensure the MySQL port (default 3306) is open to the client.
- Verify the hostname and port in the connection string are correct.
Not affiliated with MySQL. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.
More MySQL codes
- 2002Can't connect to local MySQL server through socket — the socket file is missing
- 2006MySQL server has gone away — the server closed the connection mid-query
- 1040Too many connections — the server has reached its connection limit
- 1044Access denied for user to database — missing GRANT
- 1045Access denied for user — wrong credentials
- 1048Column cannot be null — a required column received a NULL
- 1050Table already exists — CREATE TABLE failed because the name is taken
- 1051Unknown table — a DROP or query referenced a table that does not exist
- 1054Unknown column — the column name is not defined on the table
- 1062Duplicate entry for key — unique constraint violated
- 1064SQL syntax error — the query contains invalid SQL
- 1136Column count does not match value count — INSERT column and value lists differ