Just run the following commands to see what's happening, with the last two giving error?
mysqladmin version
Quote:
# mysqladmin version
mysqladmin Ver 8.42 Distrib 5.1.57, for redhat-linux-gnu on x86_64
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.1.57
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 35 min 30 sec
Threads: 1 Questions: 13650 Slow queries: 0 Opens: 2007 Flush tables: 1 Open tables: 64 Queries per second avg: 6.408
mysqladmin -h `hostname` --port=3306 version
Quote:
# mysqladmin -h `hostname` --port=3306 version
mysqladmin Ver 8.42 Distrib 5.1.57, for redhat-linux-gnu on x86_64
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.1.57
Protocol version 10
Connection MY HOST NAME via TCP/IP
TCP port 3306
Uptime: 40 min 41 sec
Threads: 1 Questions: 14929 Slow queries: 0 Opens: 2039 Flush tables: 1 Open tables: 62 Queries per second avg: 6.115
mysqladmin -h host_ip version
Quote:
# mysqladmin -h host_ip version
mysqladmin: connect to server at 'host_ip' failed
error: 'Unknown MySQL server host 'host_ip' (1)'
Check that mysqld is running on host_ip and that the port is 3306.
You can check this by doing 'telnet host_ip 3306'
mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock version
Quote:
# mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
UPDATE
Well was defiantly missing /tmp/mysql.sock ?
So have recreated by doing the following AFTER a backup:
Quote:
# cp -fr /var/lib/mysql /var/lib/mysql.old
Recreate the symbolic link to the .sock file:
Quote:
# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
Check the permissions of the /var/lib/mysql
Quote:
# chmod 0755 /var/lib/mysql
Quote:
# chown mysql:root /var/lib/mysql
Now to find out what else seems to have gone wrong, just my luck.
