LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-06-2008, 12:19 PM   #1
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Rep: Reputation: 15
pcbsd mysql server error


ok, have my pcbsd (all latest)server 90% up and running --

anytime I try to start mysql, I receive the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)

i'v su'ed, this is a fairly fresh install of pcbsd...

where would I find error logs for this, any thoughts on what's causing the error - did a few googles, got nothing definitive for a solution.... am just trying to get it working -- this is first time setting up a server from scratch...

Thanks,
B
 
Old 10-07-2008, 07:10 AM   #2
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
any thoughts?
 
Old 10-07-2008, 08:22 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,704

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
Quote:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
Does the socket /tmp/mysql.sock exists?
If it doesn't exist, it means that mysqld daemon is not running, or it creates the socket in a different location.
You can check /etc/my.cnf or the <hostname>.err logfile for the correct location of the socket file.

Last edited by bathory; 10-07-2008 at 08:23 AM.
 
Old 10-07-2008, 08:24 AM   #4
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Does the socket /tmp/mysql.sock exists?
If it doesn't exist, it means that mysqld daemon is not running, or it creates the socket in a different location.
You can check /etc/my.cnf or the <hostname>.err logfile for the correct location of the socket file.


don't see a my.cnf anywhere in etc.

will check the err logfile
 
Old 10-08-2008, 06:24 AM   #5
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
am now getting the following error message:

[3] 94956
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
pcbsd# 081008 06:22:32 mysqld_safe Logging to'/var/db/mysql/pcbsd.err'.
081008 06:22:32 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql


after running the following command:
/usr/local/bin/mysqld_safe –user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword

still have not been able to grok this one
 
Old 10-08-2008, 07:12 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,704

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
Quote:
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
Did you check if mysqld is running and it has created the socket in /tmp ?
 
Old 10-08-2008, 07:20 AM   #7
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Did you check if mysqld is running and it has created the socket in /tmp ?
how???? i've done everything all the internet instructions say to do
 
Old 10-08-2008, 07:55 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,704

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
Code:
ps -ef|grep mysqld
ls -l /tmp/mysql.sock
Did you find anything in /var/db/mysql/pcbsd.err?
 
Old 10-08-2008, 08:00 AM   #9
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
/var/db/mysql/pcbsd.err reads as follows:

81008 06:21:45 mysqld_safe Starting mysqld da
emon with databases from /var/db/mysql
081008 6:21:45 [Warning] Ignoring user change
to 'ser=mysql' because the user was set to 'm
ysql' earlier on the command line

081008 6:21:45 [ERROR] Can't open the mysql.p
lugin table. Please run mysql_upgrade to creat
e it.
081008 06:22:32 mysqld_safe Starting mysqld da
emon with databases from /var/db/mysql
081008 6:22:32 [Warning] Ignoring user change
to 'ser=mysql' because the user was set to 'm
ysql' earlier on the command line

081008 6:22:32 [ERROR] Can't open the mysql.p
lugin table. Please run mysql_upgrade to creat
e it.
 
Old 10-08-2008, 08:32 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,704

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
I guess you have to run mysql_upgrade prior trying to start the server. Take a look here for details.
 
Old 10-08-2008, 08:37 AM   #11
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
pcbsd# mysql_upgrade
Looking for 'mysql' in: mysql
Looking for 'mysqlcheck' in: mysqlcheck
Running 'mysqlcheck'...
mysqlcheck: Got error: 2002: Can't connect tolocal MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
pcbsd#



so, my problem is somehow with the tmo/mysql.sock

I'm getting frustrated
 
Old 10-08-2008, 09:09 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,704

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
So, is mysqld running? What is the output of:
Code:
ps -ef|grep mysqld
 
Old 10-08-2008, 09:14 AM   #13
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
no output --- doesn't display anything
 
Old 10-08-2008, 12:12 PM   #14
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
anyone? not sure what else to do... am trying to get my server 100% up and running
 
Old 10-08-2008, 12:36 PM   #15
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
i can't seem to find any my.cnf file either
 
  


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
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
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
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


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