I use the following command:
mysql -u root -h 127.0.0.1 -p
and the error message is :
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Who can help me to fix it, thanks in advance.
I use the following command:
mysql -u root -h 127.0.0.1 -p
and the error message is :
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Who can help me to fix it, thanks in advance.
You need to change the bind-address parameter to 127.0.0.1 in the mysql config file (my.ini or my.cnf) or use the one that is defined there.
If that doesn't work you should check that the mysql service is actually running.
What do you do if you have several my.cnf files, how do you tell which one is used?
/usr/local/mysql-5.1.50-linux-i686-glibc23/mysql-test/include/default_my.cnf
/usr/local/mysql-5.1.50-linux-i686-glibc23/mysql-test/suite/federated/my.cnf
/usr/local/mysql-5.1.50-linux-i686-glibc23/mysql-test/suite/ndb/my.cnf
/usr/local/mysql-5.1.50-linux-i686-glibc23/mysql-test/suite/rpl/my.cnf
/usr/local/mysql-5.1.50-linux-i686-glibc23/mysql-test/suite/rpl_ndb/my.cnf
Is the server started with --skip-networking?
Please check http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html for a solution.