LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (http://www.linuxquestions.org/questions/linux-server-73/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock-557441/)

mohadesz 05-29-2007 09:10 AM

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

ZAMO 05-30-2007 02:53 AM

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:

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

  su - mysql
  mysql_install_db


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 08:46 AM.