Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't connect to local MySQL server through socket '/tmp/mysql.sock'

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
Hi All, Recently i have inherited an old project. Couple of days back the system went off i logged into the machine and manually restarted the services.i don't have much experience working with mysql . Started mysql service by giving the following command mysqld_safe ..it worked. I have a mysql gui client of my pc ..its able to connect. When i checked the webapplication that uses the mysql database it gave me the following error message.

Couldn't connect to database: Can't connect to local MySQL server through socket '/tmp/mysql.sock'

searched for the mysql.sock in the machine ..i am not able to find it.

I try to shutdown the mysql by issuing mysqladmin - shutdown
gave me error message not able to connect to mysql server.

So i am not able to shutdown the mysql. Could some one give some insight on this ...

Thank you.


 
Try connecting via the network (mysqladmin -h ipaddress) even if you're on the same machine.

If you can't do that, then you're going to have to kill the mysql process and restart it.

 
Could you tell me how can i kill the mysql process ...
 
It depends on what OS you're running. If it's linux: killall mysqld, if it's NT then Ctl-Alt-Del.
 
Its free bsd, issued ps -aux listed mysql process and killed the process by kill -9 pid.

What is the proper command to start the mysql process...?
 
I issued mysqld_safe command . Mysql process restarted ...

Now when i check the mysqlDB through my pc mysql gui client process i am not able to see the tables & datas ..i don;t know what happened. Could some one give some insight what might have happened here
 
May be there is problem with my pc client so i logged into the system in mysql prompt and issued the command show tables;
gave me following error message

ERROR 12: Can't read dir of './sso/' (Errcode: 13)

Is there a way i can fix this issues ..to make things worse i haven;t backed my tables & datas ...

Appreciate any insight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top