Check MySQL Server is up and down
Mysql is UP :
# mysqladmin -u root ping
mysqld is alive
Mysql is DOWN :
# mysqladmin -u root 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!