Webmin bug deleting mysql db's

I don’t know if this has been reported and I’m pretty new to virtualmin and webmin but I have today come accross a really annoying bug that I thought I should let you know about

If I create a domain and a mysql database using the virtualmin api then it is impossible to delete the mysql databases in webmin

I have an automated domain creation routine that uses the virtualmin api to log in via a remote location that will create a sub domain and a database of my choosing then deploys a site.

After creating roughly 60 sites during testing I wanted to remove the test sites so I used the virtualmin control panel to do this.
After deleting the the subdomains I checked in virtualmin and the db’s were still showing despite the fact that I had asked for them to be deleted when I deleted the subdomain

So I used webmin to drop the db’s

All well and good as nothing was showing and the mysql console showed that the db’s had all gone.

I then tried to create another test site using the same name as one of the test sites I had deleted and I got an error

A database with the same name and type is already associated

With a lot of help from my host I found that the ONLY way to delete these databases now is to use the virtualmin delete-database command

After issuing that command for the db in question I was then able to go ahead and re-create the subdomain and db with no issues.

The only way of seeing the databases is to ssh into my host
run the “mysql” command
then run “use mysql”
This switches databases and I can then see the supposedly deleted ones

So my conclusion is that webmin should either not allow db’s to be deleted that have been created using the virtualmin api

OR preferably

It should allow them to be deleted and take care of the fact that they could have been created using the virtualmin api.

Either way something needs to be fixed becaus there is little to no chance of knowing that the db’s still exist after you have deleted them in webmin

There is also the issue that virtualmin control panel didn’t delete the db’s when expected but at least that left them viewable in webmin

I don’t know what the form is for creating bug tickets so I’m hoping that someone from virtualmin will pick this post up and run with it :slight_smile: