-2

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (Mysql::Error)

when i run rails server it gives me above error. I am using rails 2.3

Bilal Basharat
  • 3,066
  • 6
  • 21
  • 20
  • possible duplicate of [Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)](http://stackoverflow.com/questions/4448467/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock) – Rick Smith Jun 11 '15 at 18:52
  • but the solution there is not proper . because this issue arises when mysql not runing in background. so http://stackoverflow.com/questions/4448467/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock is not proper solution – Bilal Basharat Jun 11 '15 at 18:53
  • I see. Could you update your question to explain the differences, it would help future users. – Rick Smith Jun 11 '15 at 18:56

1 Answers1

0

I have used this command to run the sql server

sudo /sbin/service mysql-default start
sqluser
  • 5,502
  • 7
  • 36
  • 50
Bilal Basharat
  • 3,066
  • 6
  • 21
  • 20