Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-08-2006, 05:51 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2006
Posts: 8
Rep:
|
Can't connect to local MySQL server through /mysql.sock
How can I fix this prblem??
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
-Ganesh
|
|
|
|
06-08-2006, 06:59 AM
|
#2
|
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
is the mysqld process running ? Check this first by typing :
Code:
ps aux | grep mysqld
|
|
|
|
06-08-2006, 11:39 PM
|
#3
|
|
LQ Newbie
Registered: Jun 2006
Posts: 8
Original Poster
Rep:
|
[root@enter3 root]# ps aux | grep mysqld
mysql 5220 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld
mysql 5222 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld
mysql 5223 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld
root 9389 0.0 0.1 1732 596 pts/0 S 10:08 0:00 grep mysqld
[root@enter3 root]#
|
|
|
|
06-08-2006, 11:41 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2006
Posts: 8
Original Poster
Rep:
|
I changed the 'datadir' on file /etc/my.cnf file.
then I started it with 'mysqld_safe'
Now its running on its own.
I dont know what happend.
- Ganesh
|
|
|
|
06-08-2006, 11:45 PM
|
#5
|
|
LQ Newbie
Registered: Jun 2006
Posts: 8
Original Poster
Rep:
|
Anyway who ever is having problem with mysql.sock
Make sure the mysql base directory and mysql data directory should have the proper permissions.
- chown mysql.mysql <folder>
Forget about the creation of mysql.sock on your own. On mysql startup it creates this file.
So the error
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
is only because of permissions problem.
-Ganesh
|
|
|
|
06-09-2006, 10:39 AM
|
#6
|
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
Quote:
|
is only because of permissions problem.
|
not only  that was the point of my first question, cause it can also be the same error when the process isn't running
Ever hear of that saying, start with the easiest things first 
|
|
|
|
03-14-2007, 06:57 PM
|
#7
|
|
Member
Registered: Nov 2001
Location: n chicago, IL. USA
Distribution: Slackware
Posts: 306
Rep:
|
a lil late for this thread, but i ran into the same problem.
everything was running fine and the mysql error popped up.
i mdified my my.cnf
and this did the trick.
forgot where i found this 
|
|
|
|
07-13-2009, 10:05 AM
|
#8
|
|
LQ Newbie
Registered: Jul 2009
Posts: 1
Rep:
|
create the mysql.sock with the following command
mysql -uroot -p -socket=/dbadmin/mysql/mysql01/run/mysql.sock
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:11 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|