phpMyAdmin problem with mysql

I don’t know if it’s the problem. The thing is after I did some yum update, using phpMyAdmin to restore my wordpress databases failed.

The alternative way is just to backup the /var/lib/mysql directory.

Whenever I need to recover my database, first rm -rf the corresponding database directory under /var/lib/mysql –be careful, not /var/lib/mysql itself since it contains mysql.sock which should not be deleted– and mv the corresponding backuped database directory there followed by “chown -R mysql:mysql <corresponding database directory>”. Everything is set again.

The easier way is to first drop the database through phpMyAdmin, then recreate it by importing the corresponding database file, which was backed up before by exporting the database file.