0

i have install mysql in my server {ubuntu 12.04 LTS} and it's work great

but now all my database is down and when i run in termeanl {mysql} it's give this error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

and when i try to start mysql it's give that error {service mysqld start}

mysqld: unrecognized service

i dont need to lose my data so i dont make anything in the server, can you please help me?

Sideeq Youssef
  • 883
  • 2
  • 10
  • 24

2 Answers2

2

As i menthoid here, there are many ways to rome. I did mention apache, but as you figured out, the correct term was mysqld.

So instead of the command start mysql, you can also use /etc/init.d/mysqld start.

Community
  • 1
  • 1
Mathlight
  • 6,125
  • 16
  • 60
  • 104
0

There are lots and lots of links for troubleshooting this error. For example:

In your case "111" is connect error - you simply don't have the mySql server running.

So the real problem is getting "service mysqld start" to work.

Suggestion: try reinstalling:

Community
  • 1
  • 1
paulsm4
  • 107,438
  • 16
  • 129
  • 179
  • Thanks, but it's not the same issue, i try to make it run with service mysqld start.. – Sideeq Youssef Dec 17 '13 at 22:55
  • 1
    It's *exactly* the issue. The "error 2002" is a red herring because the service won't start (I/O error 111: connection refused). The goal is to figure out why it isn't starting. Then make it start automatically. – paulsm4 Dec 17 '13 at 22:57
  • @csbukhari, i must agree with paylsm4. The `/etc/...` thing is just a work around. You've got to find out why it isn't starting normal. ( so you better start reading all the apache log files, mysql log files and system log files and try to see where an error occurs – Mathlight Dec 17 '13 at 22:59