Code2care : TechZone Apps & Tutorials

Error 2003 Can't connect to MySQL server on localhost



ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (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 = 127.0.0.1 in my.conf configuration file (try commenting out bind-address and restarting mysql server may work).


Top











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
android
x 175
eclipse
x 29
notepadplusplus
x 20
macosx
x 14
sharepoint
x 14
html
x 14
mac
x 13
androidstudio
x 11




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


Code2care © 2012-17