How to detach/release and re-attach a database in Virtualmin

How to detach/release and re-attach a database in Virtualmin

Sometimes a database gets orphaned in Virtualmin. It’s still there, but it’s not attached to a client record. Or, you might have been moving stuff around, and now your database is attached to the wrong service.

Generally speaking when a Virtualmin database is not attached or attached to the incorrect user, you will experience problems with backing up. See the reason is Virtualmin doesn’t backup databases which are not linked to a user. Or when you think you’re restoring the correct user, you might actually not get the database back.

This article outlines how to attach and detach a database in Virtualmin.

Use this menu:

Server Configuration / Disable and Delete / Disassociate Features

As from their Disassociate Features documentation:

“Features enabled or disabled on this page will not update any system configuration files – instead, only Virtualmin’s database of features it expects a domain to have will be changed. This can be used to import a feature that has been setup manually, or to disconnect a configuration so that it is preserved when a virtual server is deleted.”

Choose MySQL

Click Save.

Now navigate to the correct user, and then:

Edit Databases

Import Database

The orphaned database should be on the list.

Share this article

Leave a Reply

Your email address will not be published.

Scroll to Top