Code2care : TechZone Apps & Tutorials

Error 2003 Can't connect to MySQL server on localhost

ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)

If you get the above error message when you try to connect on MySQL server through command prompt (or terminal), then check for the following things,

    1. Check if mysql process (server demon) is running.

    2. Check your firewall settings.

    3. Do a Telnet <host ip/name> 3306.

    4. If step 3 works you should get a response as server version details, if it doesn't work then telnet: Unable to connect to remote host: Connection refused message is displayed. Try changing 3306 Default MySQL port to some different port number.

    5. Check that the bind-address = in my.conf configuration file (try commenting out bind-address and restarting mysql server may work).


Posts related to mysql.

1. How to find AUTO_INCREMENT fileds value in mysql table

2. Error 2003 Can't connect to MySQL server on localhost

3. Mysql error 1064 TYPE=MyISAM encountered while SQL dump import

4. Connection Failed: 1130 PHP MySQL Error

Popular tags
x 175
x 29
x 20
x 14
x 14
x 14
x 13
x 11

1000+ C Programs     PHP Tutorial     JSON Tutorial     Swift Tutorial     India Pinocdes     About Us     Privacy Policy

Code2care © 2012-17