LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 08-13-2005, 08:32 PM   #1
yatla
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Rep: Reputation: 0
mysql can't connect to server through socket


I'm trying to get mysql working on MEPIS 3.3.1.

I've installed mysql client & server 4.0.24 using synaptic package manager. When I run the mysql command, I get the follwoing error msg

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

I changed the owner of the /var/run/mysqld directory to mysql user and gave all users read/write access (thought this may be a permission problem), but I still have the error msg. I get the same error msg when I try to access mysql through a php script.

Any pointer's?
 
Old 08-14-2005, 07:36 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
sounds like your mysql server isn't even running. it needs to be running in the background before you connect to it with a client.
 
Old 08-14-2005, 02:39 PM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,569

Rep: Reputation: 141Reputation: 141
u may try
ps -e | grep mysqld
to see if its running
 
Old 08-14-2005, 03:13 PM   #4
yatla
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks - I'm a linux newbie and trying to find my way.

mysqld is not running. I noticed that when mepis boots up it trys to start mysql server, but then there's an error msg that goes by quite quick and so hard to read, but I think it's the same msg about not being able to connect to the socket.

When I run mysqld at the shell prompt I get the follwoing
050814 14:57:26 InnoDB: Started
050814 14:57:26 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
050814 14:57:26 Aborting

050814 14:57:26 InnoDB: Starting shutdown...
050814 14:57:28 InnoDB: Shutdown completed
050814 14:57:28 mysqld: Shutdown Complete

Something didn't get setup right when it was installed - I'm lloking through mysql docs for some clues.

Also, I noticed that mysql protocol was not allowed in the firewall - so I enabled - not sure that that should effect the sever on my machine...
 
Old 08-14-2005, 03:40 PM   #5
yatla
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
well ok, I followed the mysql docs as follows for post install instructions

$ cd /usr
$ bin/mysql_install_db

this setup all the tables. I did try this command before I posted the note the first time. I don't know if I just didn't have the right directoriess or what, but this script did not work before (can't remember what error message it returned).

One change I know I made was to comment out the following line in /etc/mysql/my.conf
#old_passwords = 1

This was causing some errors, and found this advice to comment out in another note.

All looks to be ok now - myslqd is running - now I just have to setup the users and paswword.

Thanks for the help.
 
Old 09-18-2005, 04:57 AM   #6
garthw
LQ Newbie
 
Registered: Apr 2004
Location: Whistler, Canada
Distribution: Debian, Fedora
Posts: 10

Rep: Reputation: 0
Thanks Yatla ..
I had the problem with the old_passwords thing
- commented it out - then still could not start mysql with the same errors you got ..

- ran
$ cd /usr
$ bin/mysql_install_db

all good now ..
 
  


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
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
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 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
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
Can't connect to local MySQL server through socket . . . patpawlowski Programming 2 01-23-2004 03:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS

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