User management of database users

Ok, I’ll bite.

The standard Virtualmin workflow is to create a virtual server and this in turn creates the corresponding user as well as a database, with the appropriate permissions. This user can then create more database which he will own.

You do not wish to follow that workflow. You wish to give one of your users the ability to create create additional users and then create databases which will be assigned to the users that have been created, right?

If you get a Pro licence then you could simply make your user a reseller and that would make the entire thing very tidy indeed. But here is one workflow that you could follow from within Virtualmin GPL to get the result you want:

  1. create databases via Virtualmin → Edit Database (under virtual server of your user)
  2. change owner / username in Webmin → MySQL Database Server → Database Permissions button under Global Options

Caveat: you will have to give your user the required enhanced access to Virtualmin to be able to do this. Double check access, your user might have greater access to change ownership of databases than you might like.