LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 08: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, 08: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, 08: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, 08:31 AM   #4
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

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, 08:39 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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



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 08:44 AM
Mysql question mylo2003 Linux - General 1 10-15-2003 03:52 PM
MySQL question Citizen Bleys Programming 2 08-15-2003 06:07 AM
MySQL question jayakrishnan Linux - General 5 03-24-2003 10:59 PM
MySQL question jISV Programming 3 09-06-2002 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 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