Results 1 to 4 of 4
Hi,
Whenever I try to run mysql (by typing 'mysql' into Konsole) it gives me the following error:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-15-2005 #1Just Joined!
- Join Date
- Apr 2005
- Posts
- 54
MySQL error 2002
Hi,
Whenever I try to run mysql (by typing 'mysql' into Konsole) it gives me the following error:
I have tried running it on both my user account and root and also like 'mysql -u root -p' where it asks me for a password, and i type in my root password but it still gives the same error.ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I have seen many other topics about this same error on other forums aswell as this forum but none seem to have helped.
Whats wrong?
SFTR!!!
- 05-15-2005 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
Is the mysql server started?
I think you have to run either safe_mysqld --user=mysql OR mysqld_safe --user=mysql (can't remember which) to start it.
use ps aux | grep mysql to check the server started successfully.
- 05-15-2005 #3Just Joined!
- Join Date
- Apr 2005
- Posts
- 54
ok then...
That worked great THANKS![root@localhost sftr]# mysqld_safe --user=mysql
Starting mysqld daemon with databases from /var/lib/mysql
- 05-16-2005 #4Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
MySQL Error
Greetings,
As far as I know the above mentioned command will start the mysql in the safe mode. You can try to touch the file mysql.sock and then try to run the mysql in a normal mode. Then check if you still face any issues.
Regards


Reply With Quote
