LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

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


Hello,
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
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
hello,
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.
steps:
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
password:
 
Old 05-30-2007, 03:25 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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:
Code:
   su - mysql
   mysql_install_db
 
Old 03-15-2008, 05:06 AM   #4
konqi
Member
 
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.
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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