$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/apache2 stop
$ sudo cp -rf /var/lib/mysql YOURS/mysql
$ sudo mv /var/lib/mysql /var/lib/mysql.bakd
$ sudo /etc/init.d/mysql start
Starting MySQL database server: mysqld...failed or took more than 6s.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
$ sudo rm -rf /var/run/mysqld
$ sudo /etc/init.d/mysql start
Starting MySQL database server: mysqld...failed or took more than 6s.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
google, xxx
resolve:
$ sudo chown -R mysql YOURS/mysql
$ sudo chgrp -R mysql YOURS/mysql
$ sudo /etc/init.d/mysql start
Starting MySQL database server: mysqld.
Checking for crashed MySQL tables in the background.