2019-01-21

Upgrade mysql from 5.6 to 5.7

Some time ago I upgraded a copy of the Data Warehouse Mysql database from 5.6 to 5.7.
Now we have tested all our SQL against 5.7 and lo and behold no errors! 
I now test converted the database again, this time it went fast just a few minutes, since I fixed the old format temporals, very good indeed.
This time I run the Mysql_upgrade script as user  'mysql', so the 'mysql_upgrade_info' file was saved
After the upgrade I learned you must restart Mysql after Mysql_upgrade script is run, since the schema is physically updated, and parts of the old schema seems to cached in memory, Very important. 
You should redirect the output from the upgrade script for later inspection.
I found about 150 tables which needed a dump/reload to fix minor problems.

error    : Table upgrade required for `DB`.`ACE_PO_REPORT`. Please dump/reload table to fix it!
error    : Table upgrade required for `DB`.`ALL_ORDERS_TRIM`. Please dump/reload table to fix it!
...

I just created a simple bash script dumping and reloading all problem tables: Unfortunately that took some hours to run, for the real conversion I will probably create an ITL script running all dump/reload tables in parallel.
So far so good, now I only have to learn how to do a an Ubuntu 16.04 upgrade of Mysql to 5.7. and find a suitable weekend to do the conversion 

No comments:

Post a Comment