LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-17-2006, 01:54 AM   #1
BertieB
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
MySql will not start ERROR 2002:


I see that I am not the only newbee that has had problems with MQSQL but please help. I have included the syslog at the bottom but this means little to me, perhaps some of you understand what it is trying to tell me?

MySql will not start and I get the error 'ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' when I do a mysql -p 'password'

I am running Debian Sarge with PHP4 and MySql. The system has been stable and I have installed a few applications the are using PHP4 and MySql, however yesterday I did something stupid and do not know how to fix it!

I was trying to get the mail server running with no luck at all and I read in one chat room that by doing an apt-get remove postfix postfix-tls libsas12 sas12-bin lisas12-modules ipod-ssl uw-imapd-sssl and then re-installing them that the mail server would work. It does NOT! And now MySQL is not working either.

I have run;
updatedb (followed by)
locate mysqld.sock
locate mysql.sock
And neither return a result so I guess that MySql is not actually running.

How do I start MySqld.sock ? I have seen lots of posts that say start this, and start that, but with no explanation of how too. Please Please help as I am desperate to get MySql working again.

Hope there is help out there for me.

Best regards

Richard.

server1:/var/log# /etc/init.d/mysql restart
server1:/var/log# ls -l /var/run/mysqld/mysqld.sock
ls: /var/run/mysqld/mysqld.sock: No such file or directory
server1:/var/log# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:imaps *:* LISTEN 1797/couriertcpd
tcp 0 0 *op3s *:* LISTEN 1712/couriertcpd
tcp 0 0 *op3 *:* LISTEN 1655/couriertcpd
tcp 0 0 *:imap2 *:* LISTEN 1748/couriertcpd
tcp 0 0 *:www *:* LISTEN 1083/apache2
tcp 0 0 *:ssh *:* LISTEN 1063/sshd
tcp 0 0 *:smtp *:* LISTEN 1904/master
tcp 0 0 *:https *:* LISTEN 1083/apache2
tcp 0 0 debianbox.com:ssh 192.168.1.33:1175 ESTABLISHED2840/sshd: richard
server1:/var/log# ps aux | grep -i mysql
server1:/var/log#


Apr 17 06:26:49 server1 syslogd 1.4.1#17: restart.
Apr 17 06:26:51 server1 postfix/pickup[2544]: 7B7181CC1E2: uid=0 from=<root>
Apr 17 06:26:51 server1 postfix/cleanup[2793]: 7B7181CC1E2: message-id=<20060417042650.7B7181CC1E2@server1.example.com>
Apr 17 06:26:51 server1 postfix/qmgr[1908]: 7B7181CC1E2: from=<root@richard@rbuckley.com>, size=669, nrcpt=1 (queue active)
Apr 17 06:26:52 server1 postfix/smtp[2795]: 7B7181CC1E2: to=<root@richard@rbuckley.com>, orig_to=<root>, relay=mail1.123utpeking.no[212.247.101.19], delay=2$
Apr 17 06:26:52 server1 postfix/cleanup[2793]: 401491CC1E1: message-id=<20060417042652.401491CC1E1@server1.example.com>
Apr 17 06:26:52 server1 postfix/qmgr[1908]: 401491CC1E1: from=<>, size=2851, nrcpt=1 (queue active)
Apr 17 06:26:52 server1 postfix/qmgr[1908]: 7B7181CC1E2: removed
Apr 17 06:26:52 server1 postfix/smtp[2795]: 401491CC1E1: to=<root@richard@rbuckley.com>, relay=mail1.123utpeking.no[212.247.101.19], delay=0, status=bounced$
Apr 17 06:26:52 server1 postfix/qmgr[1908]: 401491CC1E1: removed
Apr 17 06:39:01 server1 /USR/SBIN/CRON[2799]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 $
Apr 17 07:07:37 server1 -- MARK --
Apr 17 07:09:01 server1 /USR/SBIN/CRON[2809]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 $
Apr 17 07:17:01 server1 /USR/SBIN/CRON[2819]: (root) CMD ( run-parts --report /etc/cron.hourly)
Apr 17 07:27:37 server1 -- MARK --
Apr 17 07:39:01 server1 /USR/SBIN/CRON[2821]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 $
Apr 17 08:07:37 server1 -- MARK --
Apr 17 08:09:01 server1 /USR/SBIN/CRON[2831]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 $
Apr 17 08:17:01 server1 /USR/SBIN/CRON[2869]: (root) CMD ( run-parts --report /etc/cron.hourly)
Apr 17 08:27:37 server1 -- MARK --
Apr 17 08:39:01 server1 /USR/SBIN/CRON[2926]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 $
 
Old 04-17-2006, 02:15 AM   #2
BertieB
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,

What do you guys think would happen if;

I made a copy of the files in /etc/lib/mysql/mysql
Then did a full re-install of MySql -
then replaced the files in /etc/lib/mysql/mysql with the copy that I took?

Do you think that all the data would be preserved or is that too simple?

Richard
 
  


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: 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 2002, Cannot start mysql djchris Linux - Software 5 04-13-2004 06:12 PM
I am getting an Error 2002 when installing Mysql blanderson Linux - Newbie 0 10-16-2003 12:11 PM
error 2002, loging into MySQL. please help meluser Linux - Software 13 03-16-2003 09:57 PM

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

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