Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-28-2003, 07:26 PM   #1
Registered: Jun 2003
Location: Madison, WI
Distribution: RedHat 8.0
Posts: 72

Rep: Reputation: 15
mysql error

i just installed mysqwl and when i try to start it i get

[root@localhost bin]# ./mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost bin]#
what should i do to fix this problem?
Old 06-29-2003, 03:08 AM   #2
LQ Newbie
Registered: Jun 2003
Distribution: RH9, Gentoo, Slack
Posts: 23

Rep: Reputation: 15
What sounds like is happening is that the MySQL daemon is not running. mysqld must be running in order for a user to login to mysql. For my particular machine, MySQL is installed to /usr/local/mysql, so to start mysqld on my box, I use /usr/local/mysql/bin/mysqld_safe --user=mysql. This should start the MySQL daemon and allow you to run mysql. You will of course need to use the path that corresponds to mysqld_safe on your machine.
Old 06-29-2003, 03:22 AM   #3
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
And believe it or not, if you have MySQL installed (if this is a Mandrake system, which it is if my memory serves correctly, which it hardly ever does ) then you should have an entry in /etc/init.d for mysql, and to start it you only have to:
/etc/init.d/mysql start

Furthermore, you should only start 1 thread related to your issue, 2 or 3 (or more) are going to not only cause YOU confusion, but the responders now have to look at 2 threads to see if they are duplicating work already in progress.


The command you are issuing above is to access mysql to do maintenance on it. Such as adding users, creating/removing appending databases. You need to start the mysql daemon (mysqld) to do what you are trying to.




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 03:13 PM
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
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 07:23 AM
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
Error compiling perl-DBD-MySQL after upgrading to MySQL 4.1 pitaro920 Linux - Software 1 01-16-2006 05:28 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration