Forum Thread: MySQL Not Working

when i try to run mysql through the bash shell by typing "mysql" it will give me the following " Can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (2) "

I'm running kali, and have tried on root to see if it would make a difference but did not. Also when i try going to /var/run/mysqld/mysqld.sock it says no such file or directory

Join the Next Reality AR Community

Get the latest in AR — delivered straight to your inbox.

6 Responses

/sbin/service mysqld start

Should be the right command off the top of my head, someone please correct me if I'm wrong.

Basically if you have an issue where you can't connect; check and make sure it's on before you run down the list of potential problems. That's just basic I.T. problem solving.


Sorry guys, i was trying to start it under a different account other than root. I did not give my other users permision to use MySQL.

When I started mysql from an account other than root from the GUI it would give me sh: 1: service: not found. Which made me believe it was something to do other than permisions.

easy steps for this
mkdir /var/run/mysqld/
chmod 777 /var/run/mysqld
service mysql start

Share Your Thoughts

  • Hot
  • Active