Our blog

 

Ubuntu Xampp MySQL Administrator

If you are using XAMPP on Ubuntu (or probably other) Linux and are also trying to use the MySQL Administrator and MySQL Query Browser GUI tools available in the repo's, you have probably hit an error message like this:

CODE:
  1. Could not connect to host 'localhost'.
  2. MySQL Error Nr. 2002
  3. Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

A nice quick fix for this one. In the terminal run the following two commands and then you should be able to connect fine using localhost as the host and the configured MySQL username and password, probably root and {password}.

CODE:
  1. sudo mkdir /var/run/mysqld/

CODE:
  1. sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock

More Reading:

4 Comments

Janne
November 1st, 2009

Thanks for sharing this!

 

uziel
September 3rd, 2010

So many thanks bro, since Acapulco, Gro. Mexico :-)

I search for all the web and I can't found Anything :( but whit your answer I can solve the problem :)

 

Babi
May 6th, 2011

Thanks so much..this solution helped..tried many thing wd no output..thanks again!

 

Tommy
August 14th, 2011

Thank you so much! I just spent an hour trying various solutions on the internet, and yours worked right away! I hope more people find this when they have this issue.

 

 

Leave a Reply