-   Linux - Server (
-   -   Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (

mohadesz 05-29-2007 09:10 AM

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

ZAMO 05-30-2007 02:53 AM

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

Wim Sturkenboom 05-30-2007 03:25 AM

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

konqi 03-15-2008 05:06 AM

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

Can this post be deleted?

All times are GMT -5. The time now is 10:20 PM.