2

I have a few schemas, Which are included in mysql 4 instance, And i want to move them to other mysql instance which running under a newer version - mysql 5.6. This instance is already including some schemas. I want to move these schemas from the old version to the new version, And so to get rid of the old mysql instance.

What is the best practice to do so? Do i need to upgrade each version (4-->5.0, 5.0-->5.1, etc), And only after the schemas will be updated to version 5.6 i will be able to move them to the new instance?

I don't have any experience with mysql upgrading, So any tip would be great.

  • Why not to simply do a backup of the old ones (usning mysqldump), and restore them on the new one! – Jehad Keriaki Aug 14 '17 at 18:45
1

You should be able to just mysqldump the individual databases and load them straight into a MySQL instance running on the latest version. I have recommended this before:

When doing this, please do not move the grants by dumping the mysql schema. The number of columns have changes between versions :

Try to extracts the grants with pt-show-grants or emulate it as suggested

0

If possible, use the latest mysqldump to dump the 4.x data. I think this will prevent a syntax error on CREATE TABLE due to TYPE=... changing to ENGINE=....

Is that 4.0? or 4.1? 4.0 had no concept of CHARACTER SET, so there could be other issues.

Will such a huge leap work? There may be a small number of incompatibilities that need to be worked out. But mostly it should work. Open a new Q&A if you are stumped on it; a few of us are "old timers" and should be able to help you. (I started with 3.53.)

If possible, simply start over with fresh GRANT statements; there have been changes in almost every major release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.