MySQL Error in Virtualmin Migration

SYSTEM INFORMATION
OS type and version Ubuntu 20.04.4
Webmin version 1.984
Virtualmin version 6.17-3
MySQL version 8.0.28-0ubuntu0.20.04.3

I have 2 VPS with the same config, both uptodate.
VPS1 have 6 domains 3 of them with MySql.
VPS2 Have 10 domains
All works fine when I migrate 3 domains with no DB.
When I try to migrate the others 3 ones I’m getting the same kind of error:

Restore failed : SQL grant all on lacunza.* to ‘mario@lacunza.biz’@‘localhost’ with grant option failed : You are not allowed to create a user with GRANT

I search a lot here and in the web but I can’t find any fix for that problem. I can’t understand why this bug is still open(MySQL 8 error MySQL Database Server/Create User · Issue #1144 · webmin/webmin · GitHub) since 2019.
Let me know what kind I do to help. I really appreciate any help.

I remember reading somewhere that if you create the mysql users in the target system, before importing the sites, it works well.
I did not try it, but I think if you just create the users without giving them any permissions, the importing process takes care of everything else.

I just try it, same error.

Before of this domain, I move another Wordpress site with no issues with the DB, trying with another WP and 2 PHP scripts no success at all, same issue with all 3

Hello,
any help with this bug? I need to migrate 3 biggers sites to a new VPS and I can’t.
I thought migrating from VM to VM would be easy but I haven’t been able to fix the problem with the MySQL error.
I try:

  • grant permissions in Mysql console
  • create same user before of restore backup with and without permissions over DB
  • restart Mysql after each change

If some Dev need access to both VPS just contact me, thanks!

There are 6 sites: 2 php + 2 Wordpress + 2 domains with no data, 1 WP site was migrated with no issues (web, db and email etc) the other one and the 2 PHP have issues and the migration process was stopped.

How are you migrating?
Using a backup and restore?

Have you tried using the “Transfer virtual server” instead?

Yes, Im using this method:
https://www.virtualmin.com/documentation/system/migrate/

I just try “Transfer virtual server” and the same error…

Please check the image attached, I’m showing the exact moment when the Restore process crash.

At this point, what is missing? I can see in Virtualmin>Edit Users screen, some users are missing, I think I can create a new one for the DB and change manually the params in the PHP files for the website.

But what about the email users?? their email boxes are already migrated at this point or all that info is missing?

If I try to recreate the missing email users I get this error:

Failed to save user : Home directory /home/rcorta/homes/admin already exists

I can’t migrate this sites, hope some Devs can help me, thanks!

what is this "@lacunza.biz@localhost "? where you using a remote mysql server previously? maybe that’s to blame there… should be just @‘localhost’ if db is on new machine, or just @‘lacunza.biz’ if existant on another one…, don’t know which one is desired. (?)
i would probably import mysql user/db manually, depending on setup.

That’s a user in the Virtualmin Edit users menu… An email user.

Any help from Devs??
I can’t believe a simple migration process from Virtualmin to Virtualmin (same version, sameOS in the same server provider) give me an error in the User migration step…
With one of the PHP script I test the same migration under cPanel and no issues at all. I just clone the site install in cPanel and test a migration: zero issues, so it’s something wrong with the Virtualmin Migration Process.
From my research in Google seems to be an already know problem. Today is my last day for doing the migration. Any help will be appreciate.
Thanks!

1 Like

Hi, I can help you with this task. Would you be free by Monday for zoom or Google meet call? I can do it any time from Monday 9am of UK time. Currently I’m in Slovakia till Sunday. If you will still need help with this task, just send me direct message.

1 Like

Hello @unborn
thanks for your help! But I had to do a hack to fix the problem/bug and manually terminate the export process.

1 Like

Update: Due to this bug the Scheduled Backups were not migrated into new VPS.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.