Related free learning recommendations: mysql video tutorial
Application scenarios: database upgrade, The database is lost due to overwriting, uninstallation and other reasons.
This recovery is due to a version upgrade (overwrite installation), resulting in database loss; the new version of the database runs normally, but there is no previous database in it;
The following is the installation directory
It can be seen that both installation directories exist. Open the directory of the lower version, and the data folder is comfortably inside.
Prepare to migrate 5.7.24 to 5.7.31
Let’s restore the lower version of the data to the higher version:
1. Copy everything under the entire data to the higher version data; it is recommended that the higher version be empty - that is, newly installed; in this case, the duplicate data will be overwritten directly, and there will be no loss if other problems occur;
2. After the overwriting is completed: there is another key step , authorize mysql to access the files under data
sudo chown -R mysql:mysql data
Okay, if no error message appears, the data recovery will be successful!
After modifying the configuration, MySQL reported: [ERROR] The server quit without updating PID file
After modifying the configuration, MySQL failed to start, and reported an error:
sudo chown -R mysql:mysql /usr/local/MySQL/data/sudo chmod -R 755 /usr/local/mysql/datasudo /usr/local/mysql/support-files/mysql.server restart
More related free learning recommendations: mysql tutorial(Video)
The above is the detailed content of Explain how to restore the original database table after changing the MySQL version on Mac. For more information, please follow other related articles on the PHP Chinese website!