> I just installed mysql and ran the upgrade for fedora 4 but i get this
> [rootlocalhost etc]# mysql
> ERROR 2002 (HY000): Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (2)
> similar prob when try to run
> $ mysqladmin ping
> mysqladmin: connect to server at 'localhost' failed
> error: 'Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the
> socket: '/var/lib/mysql/mysql.sock' exists!
The error code (2) means the file does not exist. It is most likely in /tmp
instead. I usually create a symbolic link from one to the other as
something will always try to access the wrong socket file.
Assuming /tmp/mysql.sock exists and has the correct permissions, try:
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
The directory /var/lib/mysql must exist too.