Restore Virtual Server - MariaDB user/host mismatch

SYSTEM INFORMATION
OS type and version RHEL8.4
Webmin version 1.990
Virtualmin version 6.17 Pro
Related packages MariaDB 10.3.28 (Remote)

When we backup a site in Virtualmin on another server and try to restore it on this one, the restore fails out because during the restore process, theMariaDB user created has a mysql.user.Host column that reflects a full hostname (ex: hostname.acme.com instead of an IP address ex: 1.2.3.4). As the restore progresses, when it tries to set the MariaDB password for the user it created ‘user@hostname.acme.com’, it is trying to reset it for ‘user@1.2.3.4 instead’ of what was created earlier during restore ('user@hostname.acme.com).

I extracted acme.com.tar.gz and found the ./.backup/ folder that has acme.com_mysql. I tried setting the hostname to the IP, reassembling the archive and restoring, but the user initially created still has ‘user@hotname.acme.com’ instead of ‘user@1.2.3.4’.

What can I do to get Virtualmin to create ‘user@1.2.3.4’ when a new virtual server is created/restored?

The exact error is:

Restoring allowed MariaDB hosts …
Restore failed : SQL set password for ‘acme’@‘1.2.3.4’ = password(‘xxxxxxxx’) failed : Can’t find any matching row in the user table

Earlier in the process:

Creating MariaDB login …
… done

I noticed when creating a virtual server, the behavior manifests there as well:

Creating MariaDB login …
… MariaDB database failed! : mysql::execute_sql_logged failed : SQL set password for ‘acme’@‘1.2.3.4’ = password(‘xxxxxxxx’) failed : Can’t find any matching row in the user table

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