My company is moving our databases from self-hosted mariadb 10.1 to Google CloudSQL (which is essentially MySQL 5.7).
Dumping / restoring our application schemas looks straightforward. However I'm trying to determine how I can migrate my user accounts given the following:
- mysql.user table structure differs between the two; I can't dump and import mysql.user
- pt-show-grants, for some users, does not output statements to create the user. For instance, for some users, pt-show-grants only outputs something like
GRANT INSERT, SELECT, UPDATE ON `schema`.`table` TO 'username'@'x'
, which fails because the user 'username'@'x' doesn't exist yet on the MySQL5.7 instance. - mariadb10.1 does not have a 'show create user' or equivalent statement.
Has anyone made this kind of move before and encountered this issue? I am hoping to avoid a wild-goose-chase for dozens of passwords in order to recreate the users manually; some of these users predate me and I have no record of the assigned passwords.