Can’t Connet To MySQL Server

I just finished to install an Ubuntu Server for office work. It will act as intranet web server and information system database. I used Apache (of course plus PHP) for web server and MySQL as database server.

Installation run well and I could browse MySQL database from phpMyAdmin. I added user who can connect remotely (anyhost) but I didn’t test it. The next day he complained me because he can not connect to MySQL due to an error (Error code: 2003).

If you can not connet to MySQL server as non root users either locally or remotely, it can be solved by editing MySQL configuration file (my.cnf) and comment out the following command:

skip_networking

bind-address = 127.0.0.1

* comment out means that you need to add # before commands.

Restart MySQL server to make it work.

That’s all.

One thought on “Can’t Connet To MySQL Server

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>