Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-29-2007, 09:10 AM   #1
LQ Newbie
Registered: May 2007
Posts: 1

Rep: Reputation: 0
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

I have tried to install mysql binary, on my GNU/linux.
but I am getting this error :

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock everytime.

I don't have root access, how do I configure the mysql so it's installed locally.

please help me with this.

Thank you
Old 05-30-2007, 02:53 AM   #2
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
Make sure your sql is running....
"service mysql status"
If you are sure , if it is running..then you need to set root password first.
1.service mysql(or mysqld) stop
2.mysqld_safe --skip-grant-tables --skip-networking$
this will take a 10 or more minutes and reply you with
Starting mysql daemon with databases from /var/lib/mysql
now you can able to enter without password.
try :#mysql -uroot
this will let you login.
mysql>UPDATE user SET password=PASSWORD where user="root";
This command will update your root password.
now exit from mysql.
You can now login with new password.
mysql -uroot -p
Old 05-30-2007, 03:25 AM   #3
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
The commands on the linux command line may differ for other distributions. Which distro are you using?

If you use Slackware, there are instructions in /etc/rc.d/rc.mysqld how to create a 'default' database. On the commandline:
   su - mysql
Old 03-15-2008, 05:06 AM   #4
Registered: Oct 2007
Distribution: Gentoo, Slackware
Posts: 162

Rep: Reputation: 16
i made very stupid a mistake, i posted something in the wrong thread.... <<<ignore this post>>>

Can this post be deleted?

Last edited by konqi; 03-15-2008 at 05:10 AM.


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
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 12:08 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 > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:36 PM.

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