0

I needed to re-install my computer but I didn't think about exporting the data from mysql 5.

How do I get the data from the old installation into the new installation, is this just copying the data directory or do I have to take other steps to get to the data?

2 Answers 2

1

For MyISAM tables you can generally get away with copying them across. (Whilst the server's stopped, obviously.) For InnoDB, it can work, but you'll have to have the same basic block size settings. If you can use the same major version of MySQL and the same my.cnf you stand a good chance of having it work.

Afterwards it's a good idea to ensure the tables are rebuilt (eg. using ALTER TABLE), and make a note to mysqldump properly next time because none of this is supported or guaranteed to work!

Sign up to request clarification or add additional context in comments.

2 Comments

my.cnf <--- what is this and where can I find it ?
The MySQL config file. Depending on what MySQL build you're using it might be in the Windows folder (yuck!), or in Program Files\MySQL as my.ini.
0

I would export your data as a sql file from mysql (ie: with phpmyadmin) and then import it into the new installation. Your db should be built and filled with data pretty easily.

You said that you "didn't think about exporting the data". Does that mean you don't have access to the old installation any more?

1 Comment

Does that mean you don't have access to the old installation any more? I only have access to the files not the mysql install anymore.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.