I’m currently migrating my old virtualmin server (ubuntu 16.04) to a brand new and upgraded server (ubuntu 20.04), but I’m encountering the well known error restore error Restore failed : SQL grant all on database. to ‘user’@’%’ with grant option failed : You are not allowed to create a user with GRANT*
During my process of investigation I’ve found countless posts on this forum with no answers or with a thorough investigation by other users. All seems to conclude to “not fixeable” or “give up”.
I wanted to share my findings, read possible solution that fixed it for me, to increase the hope for other people
When I encountered this error, it looked like it only happened with user accounts that are actually e-mailaccounts.
So when verifying I noticed that this was enabled on those accounts:
When removing the database from the “grant access to”, the restore worked perfectly.
Ok the user cannot access now the database through his/hers e-mailaccount login, but in my case they were not even using it.
Perhaps this might help other people out there?
Other than that, MySQL 8 has removed the option to create users through the “GRANT … TO … IDENTIFIED BY … WITH GRANT OPTION” command. You have to do it seperately, thus old MySQL backups will always fail, since they only contain the single line command.
I would have to have a look at that kind of cPanel backup first to know for sure. Could you please share privately with me the link for that backup file. I would test and fix a problem in case I could reproduce it.