LinuxQuestions.org
Review your favorite Linux distribution.
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 11-28-2008, 01:20 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
MySQL Error??


Code:
[root@askme RPM]# rpm -ivh  mysql-server-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
   1:mysql-server           ########################################### [100%]
[root@askme RPM]# rpm -ivh  mysql-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
   1:mysql                  ########################################### [100%]
[root@askme RPM]# rpm -ivh  mysql-bench-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
   1:mysql-bench            ########################################### [100%]
[root@askme RPM]# rpm -ivh  mod_auth_mysql-2.6.1-2.2.i386.rpm
Preparing...                ########################################### [100%]
   1:mod_auth_mysql         ########################################### [100%]
[root@askme RPM]# rpm -ivh mysql-devel-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
   1:mysql-devel            ########################################### [100%]
[root@askme RPM]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@askme RPM]# mysqladmin -uroot password 'mysql123'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@askme RPM]# cd
[root@askme ~]# service mysqld restart
Stopping MySQL:
Why I am not able to run mysql?Whats that error all about?
 
Old 11-28-2008, 01:24 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Is mysql service running?
 
Old 11-28-2008, 02:19 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Code:
[root@askme ~]# service mysqld restart
Stopping MySQL:                                            [FAILED]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]
 
Old 11-28-2008, 07:14 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
take a look at mysql error log and post recent content
 
Old 11-28-2008, 11:20 AM   #5
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
This has to do with the location of your /var/lib/mysql/mysql.sock or the permission of that file and it's directory. I once had a similar problem after mixing/replacing source-built MySQL installations with RPM package based installation. My permission for /var/lib/mysql did not allow access, as such the mysql.sock file was not available.

The cause for your problem could be something else, but it's worth checking those permissions.

Last edited by Tinkster; 10-30-2010 at 05:07 PM.
 
Old 11-28-2008, 12:12 PM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
salters is probably right. Take a look who's the owner of /var/lib/mysql by
ls -l /var/lib
If it's not owned by mysql then a chown mysql may do
 
  


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. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 12:46 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
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


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