Prior to the Linux direct copy under the data of the entire database folder, in phpMyAdmin to re-give new users the appropriate permissions, Drupal successfully connected to the database. But there are more than N line error hints, all the cache-related tables are ' Read Only ', and phpmyadmin inside the optimization table is also the hint "table ' xxx ' is Read only".
I suspect file permissions, so the database folder below all the table files chmod into 777,chown into "_mysql", but this problem is more serious, drupal inside the real table crached. No way, immediately Google, found that in fact, it is very easy to solve.
First, find the location of mysqladmin, usually under Mysql/bin, and then run the command:
./mysqladmin-u Root-p Flush-tables
Then enter the root account password, right away, without any hint, re-open Drupal, everything is OK.
This time, we also found the correct permission settings for the database file: Data under Database folder 700, table file 660, all files should be owned by MySQL.