Restore backup from mysql 5.6 to server with mysql 5.7

horizon2021

Active Member
Jan 31, 2021
25
1
3
USA
cPanel Access Level
Root Administrator
Does the mysql upgrade from 5.6 to 5.7 change anything in individual databases themselves?

Looking at replacing a server that is still running mysql 5.6.

Wondering if there is any point on upgrading mysql on the old server from 5.6 to 5.7 first before doing the backup and restore to the new server which will be running on mysql 5.7?

Or if it would be the same to cpbackup from the mysql 5.6 server and restore accounts with their mysql 5.6 databases to the new server running mysql 5.7.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
631
207
343
cPanel Access Level
DataCenter Provider
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.
 

horizon2021

Active Member
Jan 31, 2021
25
1
3
USA
cPanel Access Level
Root Administrator
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...