LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2005, 09:00 AM   #1
Kevnathan
LQ Newbie
 
Registered: Sep 2004
Location: India
Posts: 10

Rep: Reputation: 0
MYSQL question


Hi I am trying to run mysql but i am getting this error

[root@OneBox bin]# ./mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


Regards,
Kevin N Khushal
 
Old 03-08-2005, 09:13 AM   #2
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
Hi sometimes mysql gets itself in a mess regarding the socks file.

do:
$ ps aux | grep my

to see if there is any mysql services running. If there are none, then you have to start it:
# /etc/init.d/mysql start

hamish
 
Old 03-08-2005, 09:24 AM   #3
Kevnathan
LQ Newbie
 
Registered: Sep 2004
Location: India
Posts: 10

Original Poster
Rep: Reputation: 0
Hi Hamish,
The mysql service is running on my linux box.

What shall i do now.

KEvin
 
Old 03-08-2005, 09:31 AM   #4
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Distribution: RH,FC/SuSE/Debian/HPUX/OSX
Posts: 518

Rep: Reputation: 30
Quote:
Hi I am trying to run mysql but i am getting this error
Quote:
The mysql service is running on my linux box.
what do you want to do? :-)
 
Old 03-08-2005, 09:39 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Edit /etc/my.cnf (or wherever my.cnf is) and change the "socket = ..." to socket = /tmp/mysql.sock" for the client [mysql] and the server [mysqld]. Of course you have to restart the server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
Mysql question mylo2003 Linux - General 1 10-15-2003 04:52 PM
MySQL question Citizen Bleys Programming 2 08-15-2003 07:07 AM
MySQL question jayakrishnan Linux - General 5 03-24-2003 11:59 PM
MySQL question jISV Programming 3 09-06-2002 12:24 PM


All times are GMT -5. The time now is 12:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration