Migrating to MySQL Enterprise

08 May 2018

We are migrating to MySQL Enterprise from community version. Currently I'm upgrading from 5.7.22 to 8.0.11. It's my bad not reading the upgrade strategy from Oracle themselves so I ended up with some issues.

What I did was uninstall the community version using yum remove and install the following RPMs. I got them from Oracle website as trial.

ISSUE #1: User specified as a definer does not exist

After starting mysqld service and logging in as root, I got error with permissions I'm assuming.

mysql> show databases;
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

Solution

I set innodb_fast_shutdown to 1 as per upgrade strategy. Value 1 means InnoDB skips full purge at shutdown.

mysql> set global innodb_fast_shutdown=1;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
# mysql_upgrade -u root -p
Enter password: 
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Upgrading system table data.
Checking system database.
...
Found outdated sys schema version 1.5.1.
Upgrading the sys schema.
Checking databases
...
Upgrade process completed successfully.
Checking if update is needed.

Conclusion

I don't know what mysql_upgrade is doing behind the scene but it's definitely fixing what seemed to have lost on user root.

TODO

I will update this post if I will encounter any migration-related issue.