LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-16-2010, 12:45 AM   #1
ajeshg
LQ Newbie
 
Registered: Aug 2009
Posts: 3

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


after creating a new partition in my ubuntu(which was mounted on media)...my mysql server stop running. If I do a "sudo /etc/init.d/{service} start it is giving an error mysql changed to upstart stop and it cannot start..also on the terminal when typing the command mysql -u root -p its throwing an error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2). when i checked /var/run/mysqld/mysql.sock...it was missing from there...may i know what will be the cause...is it due to wrongly mounted partition? how will i resolve it?
 
Old 06-16-2010, 12:47 AM   #2
subho.d
Member
 
Registered: Jun 2010
Location: INDIA
Distribution: All Linux & Unix
Posts: 86

Rep: Reputation: 19
Hi
If u don,t have that file on that place then, u create that manualy and restart the service and try to reset the root password...
thx
 
Old 06-16-2010, 12:53 AM   #3
ajeshg
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 1
yup i did dat.....even i tried a lot on /etc/mysql/my.cnf file....der was no luck...and the main error i have noticed that my eth0 connection was not detecting a that time.
 
Old 06-16-2010, 04:35 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ajeshg View Post
after creating a new partition in my ubuntu(which was mounted on media)...my mysql server stop running. If I do a "sudo /etc/init.d/{service} start it is giving an error mysql changed to upstart stop and it cannot start..also on the terminal when typing the command mysql -u root -p its throwing an error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2). when i checked /var/run/mysqld/mysql.sock...it was missing from there...may i know what will be the cause...is it due to wrongly mounted partition? how will i resolve it?
you will not be able to connect to mysql server unless it is running and the .sock file has been created.
Where is your .err log??
Can you tail that log after an attempt to start the server and paste them here please
 
Old 06-16-2010, 04:46 AM   #5
chandranjoy
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Hi,

Could you please give me the mysql error log to analyze further? Also check give me the following commands output.

1.df -h
2.fdisk -l
3.ls -alt /


Thanks,
Jai
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sawgata Linux - Newbie 9 06-02-2010 06:31 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sammy007 Linux - Networking 1 01-30-2010 06:32 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Pode Slackware 12 11-26-2008 08:21 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mohadesz Linux - Server 3 03-15-2008 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration