Error when migrate VM to new server with different MySQL version (MySQL 8)

Operating system: Ubuntu
*OS version: 20.04.2 LTS

I’m trying to migrate VM from server running with Ubuntu 16.04.7 LTS (MySQL ver: 5.7.33-0ubuntu0.16.04.1) to new server (Ubuntu 20.04.2 LTS - MySQL ver: 8.0.25-0ubuntu0.20.04.1) but got an error:

Error: SQL grant all on `wp\_olddb`.* to 'newdb'@'localhost' with grant option failed : You are not allowed to create a user with GRANT

I searched for many topics but cannot find the right solutions. Please help me!

You’re migrating a Wordpress site? The easiest way on earth to do that is with the Wordpress migration tool.

You simply install that plugin on your old site. Do a backup with it, download it. Install Wordpress on the new virtual server on your new server, install the plugin there, upload the backup from the other server that you downloaded and you’re done.

I’ve used it at least 50 times and never once had an issue. The only issue you may have is if you have a very large site. I think the default plugin has a limit of 3 GB. If your site is larger than that let me know. I have a version of that plugin that’s old and goes up to 12 GB.

I have many WordPress sites and other PHP sites. Not just once, thank for your suggesstion.