Recover data from old mysql data dir.?
My laptop is running Windows 7 Pro and I have a data directory for an old MySQL5.1 installation that has tables and information that I need. I just installed MySQL 5.5 onto my machine and would like to get the data from the old directory into the new installation. I changed my my.ini to point at the old directory, but when I went to restart MySQL it wouldn't start. Any suggestions?
Comments
MySQL 5.1 is still available.
Download it, install it, and copy the data files to the appropriate directory. Start the 5.1 server to see if it successfully can access that data. If you put everything in the right place, it should work.
Then use mysqldump to create a backup of that database. Since that utility essentially just creates a series of query statements (e.g., INSERT INTO TABLE (col1, col2) VALUES ('val1', 'val2'); over and over for each row)", it should be straightforward to load that dump into the new 5.5 database.
Did you already try to
- stop mysql
- "hard copy" the old data directory in the new folder
- start mysql ?