Skip to main content

Restore backup from mysql 5.6 to server with mysql 5.7

Comments

4 comments

  • cPRex Jurassic Moderator
    Hey there! *Usually* this work goes well, but if you have the option and can take the time to ensure the databases will work in 5.7 and perform the upgrade locally first, that may save you some headaches if any odd issues were to come up.
    0
  • ffeingol
    Typically you can restore a 5.6 backup to 5.7. Your database is not altered per-se, it's the internal MySQL structures etc. that change. If you're running modern Open Source software (like Wordpress, Drupal etc.) you really should not run into any issues. If you have custom coded stuff, then who knows. They typical issue we see is that V5.7 enforces "strict" standards (like it should). In V5.6 if you inserted 11 characters into a char(10) it just truncated it and went on (bad). In V5.7 if you do that you'll get an error.
    0
  • horizon2021
    Thanks! One thought I had is that if I backed up from the server running 5.6 and then restored the cpanel accounts to the server running mysql 5.7, then if there were any issue with the mysql 5.6 to 5.7 change for a given site, I could flip the dns back to the 5.6 server until the issue could be resolved giving more time to troubleshoot if any issue did come up. If I upgrade the old server from 5.6 to 5.7 first, I don't believe there is any easy way to go back, so then I don't have a way to flip it back to the working 5.6 if a site did have an issue. But then I got wondering if the in-place mysql upgrade would be safer than the cpbackup from 5.6 and cp restore to 5.7. I wasn't sure if the upgrade would look for and alter anything that the backup and restore wouldn't...
    0
  • cPRex Jurassic Moderator
    If you can quickly change the DNS back that would also be a good solution - whatever is easiest for you.
    0

Please sign in to leave a comment.