Home > Database > Mysql Tutorial > body text

Explain how to restore the original database table after changing the MySQL version on Mac

coldplay.xixi
Release: 2021-01-19 09:28:43
forward
2138 people have browsed it

Explain how to restore the original database table after changing the MySQL version on Mac

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
Copy after login

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
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template