How to change virtual server to use local DB server when remote server is no longer available?

Operating system: CentOS 7
OS version: Linux 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

– Related to my previous post where I test with a remote MySQL server –
Then I take that server offline. However one site has had its databases hosted on the remote server. No big deal, I have a Virtualmin backup of the site from before when the DBs were moved to the remote.

  • Restoring from backup fails because Virtualmin still tries to restore DBs to the offline remote server.
  • Disabling the MariaDB site feature fails because the remote server is not reachable.
  • Deleting the connection to the remote server (from System Settings -> MariaDB Servers) does not work, because there’s a site that’s using this server.
  • Getting the remote server online is not working because of some dump dump issue with MySQL which is no longer worth the time to get it to work. (upon attempting to move back the DBs to local: mysqldump: Got error: 1045: "Access denied for user 'remote_sql_user'@'this_host_name' (using password: YES)" when trying to connect)

Is there some work around to change the virtual server/site to use the local DB server by force?


What do you get if you run:

grep -Ril "remote_sql_user" "/etc"

It happens that the remote_sql_user is the nickname of the Virtualmin server, and is part of the FQDN, so the output you requested might be not what you’d expect.
Do you prefer that I create a unique name and try with it?

Here’s the output:


I think I found the option in the relevant domains file. Isn’t it mysql_module=?

Yes. In the file at /etc/webmin/virtual-server/domains/* that belongs to the virtual server in question, when the setting set to mysql_module=mysql, the issue is resolved.

Thank you @Ilia! :innocent:

1 Like

What was it set to?

Thank you @Ilia! :innocent:

Not at all! :slight_smile:

Something like:

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