How to add existing schema to mysql on windows
P粉204136428
P粉204136428 2023-09-14 13:51:44
0
1
442

I haven't seen anything about this topic anywhere, not even here.

The problem is that I have a MySQL 8.0 database that is on a previous hard disk (HD). Boot failed on the original drive so I copied the folder

C:\ProgramData\mysql\MySQL Server 8.0\Data\my_db
moved to the new HD and reinstalled MySQL.

My problem is that I don't see a way to install this architecture. Does anyone have any suggestions?

P粉204136428
P粉204136428

reply all (1)
P粉099000044

You cannot see your data because information about existing objects is stored in a system database that is not replicated.

If your previous hard drive is unavailable:

  1. Ensure that the MySQL versions on the old and new operating system instances are exactly the same. If not, remove MySQL on the new operating system and reinstall the required version.
  2. Stop the MySQL service.
  3. Rename the data folder (C:\ProgramData\MySQL\MySQL Server 8.0 => C:\ProgramData\MySQL\MySQL Server 8.0.bak).
  4. Completely copy the data folder from the old hard drive to the new hard drive.
  5. Start the MySQL service.
  6. Need to back up the old database.
  7. Stop the MySQL service, delete the data folder copied from the old hard disk, and rename the saved data folder back.
  8. Start the MySQL service.
  9. Restore the database.
  10. If you reinstalled MySQL in step 1, you can upgrade the MySQL version to the required version through the regular way.
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!