Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

My mysql query browser doesn't run. I just started to work with xampp and php.

So I just installed xampp in my local machine. Now I have a problem in opening mysql query browser... What I'm getting while trying to open mysql is:

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

Click the Ping button to see if there is a networking problem.

Can anyone help me to fix out the above problem?

share|improve this question
1  
Obvious question: do you have a MySQL server to browse queries against? –  Álvaro G. Vicario Apr 27 '13 at 8:08
add comment

migrated from stackoverflow.com Apr 27 '13 at 13:09

This question came from our site for professional and enthusiast programmers.

1 Answer

This question is already being answered http://stackoverflow.com/questions/5376427/cant-connect-to-local-mysql-server-through-socket-var-mysql-mysql-sock-38:

If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with

socket=/var/lib/mysql/mysql.sock

you can check if mysql is running with the following command:

mysqladmin -u root -p status

try changing your permission to mysql folder. If you are working locally, you can try:

sudo chmod -R 755 /var/lib/mysql/

that solved it for me

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.