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 11-30-2008, 03:52 PM   #1
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Rep: Reputation: 0
Unhappy ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/my..


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

That is my error. I did a find / -name mysql.sock as root and found that it does not exsist. What should I do now in order to get mysql running? Thankx!
 
Old 11-30-2008, 04:00 PM   #2
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
Hi!

Is MySQL running?
Try this:

$ ps -ef | grep mysql

And post the output.
 
Old 11-30-2008, 04:18 PM   #3
Goce
LQ Newbie
 
Registered: Nov 2008
Location: Eugene, OR
Distribution: Ubuntu Linux 8.04
Posts: 7

Original Poster
Rep: Reputation: 0
root:# ps -ef | grep mysql
root 4336 4202 0 22:16 pts/0 00:00:00 grep mysql

That's what I got.
 
Old 11-30-2008, 09:57 PM   #4
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
That is because MySQL is not running, and you can not connect to it.

If I remember well and at this moment I don't have a computer with GNU/Linux, you have to do the following:

As root:

# cd /etc/init.d
# ls
And you will find that there is a file with the name mysqld (This is if you installed mysql-server).
# ./mysqld start

And now MySQL service is up.

You can connect by typing:

$ mysql
 
  


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq mimique Linux - Software 23 08-14-2012 06:14 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 11:46 AM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.so amee_stars Linux - Newbie 2 01-22-2007 02:48 AM

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

All times are GMT -5. The time now is 10:29 AM.

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