I’m experiencing an issue when restoring a backup with Virtualmin.
When I restore a backup using Backup and Restore => Restore Virtual Servers, the restore process fails when recreating an additional MariaDB user.
Here is the relevant output:
Re-loading MariaDB database mytest_db1 ..
Creating MariaDB database mytest_db1 ..
.. done
.. done
Restoring virtual MariaDB users ..
Creating user1@mytest.com user ..
.. failed to create user : Failed to add database user : user1@mytest.com : mysql::execute_sql_logged failed : SQL create user 'user1@mytest.com'@'localhost' identified by password failed : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
.. done
This user is not the default database user created by Virtualmin. It is an additional database-only user that I created manually using the following command:
The backup completes successfully, but during the restore, Virtualmin is unable to recreate this database user because the generated SQL appears to be invalid.
Has anyone encountered this issue before, or is this a known bug? Any help would be greatly appreciated.
So it looks like the password is successfully saved in the backup, but is somehow not being used during the restore process for additional MariaDB users.