transfer MySQL database from old drive

112 views Asked by At

I have a MySQL database on a drive that I need to move to a new machine. The old database is not on a live machine anymore so I can't do a dump. Is it possible to just transfer the proper database files to the new machine and have MySQL read them? If not does anyone have any suggestions for what can be done to migrate that database to the new system?

I had a MySQL database on an Azure Virtual Machine. The virtual machine got corrupted due to a mistake I made with sysprep. To fix the issue I needed to basically rebuild the server from the ground up using a new VM. I was able to successfully attach the old drive from the failed instance onto my new machine as a F: drive.

Everything is now over on the new VM except the MySQL database. I am not sure the exact MySQL server version that was running on the old machine. The database had a combination of InnoDB and ISAM tables. I believe the database was uncorrupted.

Does anyone have a suggestion for getting the database live again? I need to move it from the current F: down to the C: and somehow attach it to MySQL.

1

There are 1 answers

0
Altmish-E-Azam On

Yes you can move your database from one drive to another one. Remember, only move those database which you have created not automatic created like mysql etc.

May be you can get the error message while accessing any table incorrect information in this case you have to repair your table using one of the following command.

repair table;

or

repair table use_frm;