Get the App
SLTechnology News&Howtos  ›  Database  › 

How to reinstall and restore the previous database by MySql5.0

Shulou Source: shulou.com Published: 2022-05-31 12:53:25 11月11日 Update

This article is to share with you about how to reinstall MySql5.0 and restore the previous database, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. Forget the premise, MySql cannot be used.

2. Uninstall MySql first, and then delete the installation directory. You can search for MySql on disk D or disk C, and then delete the related folder.

3. Delete the relevant options in the registry. Search can also be used here. Select only items when searching, and uncheck the value and sum. Then delete the MySql items found. Then you can install MySql.

4. The installation process is very simple, just follow the steps. Next, you will be asked to install the service of MySql. If you have previously deleted the service left by MySql, you can use sc delete mysql / / where mysql is the name of the service you want to delete under the cmd command. Note that cmd should be run in administrator mode, otherwise there is no permission.

After the service is installed, you can use tools such as navicat to connect to the database for testing. Then follow the steps below to restore the database, as long as the data folder in the previous MySql directory is still there.

1. Stop the mysql service (administrative tool-service, or DOS commands net stop mysql to stop, start net start mysql)

two。 Overwrite the old ibdata1 (only this file is needed here), and then copy the related database (in short: it is best to back up the original data as olddata to overwrite the existing data with the previous data)

3. Start the mysql service, and then start the database.

If you can't operate on the table after entry, it may be that the data table has been corrupted. (or some versions do not support direct copy)

This is how MySql5.0 reinstalls and restores the previous database. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Data services databases files search next premises commands tools folders more steps directories knowledge articles management utility backup that is work will Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia MySQL Shulou Tech Info Xiaomi