Database Creation From Code / Virtualmin APIs

Operating system: CentOS
OS version: Linux 7.8.2003
Webmin Version: 1.942
VirtualMin Version: 6.09

I want to create a new database from my web code as if a new user is signed up I want to create a new database and run a script. As running script from file seems possible but I haven’t been able to find any information about creating new database at user Sign Up.

You wish to create a new database at user signup. Can be done.

Now please specify where it is that the user signs up? Does the user signup in your web app or by signup you mean that a user is created by the owner of the virtual server?

User Signup on web app.

So: to expand upon your previous comment, you are asking how a database can be created in Virtualmin when a user signs up in your web app, right?

Yes! I want to do the same.

This can be done quite easily via the Virtualmin APIs. There is a Virtualmin Command Line API and a Virtualmin Remote API.

Google the terms or if you have difficulty, I could post links to both.

I will get back to you after digging something on it.

Thank you or your support. :+1:

Searching for those keywords got me here but I am unable to find any information about crating database through this then I got to this link

here is details provided about how to create database through virtualmin how can i combine both. If you could please elaborate!

I don’t think I understand what you’re asking, if that doc doesn’t answer your question.

What do you mean by

Both what? Account and database creation? Just create a domain using the create-domain API call…if you’ve configured Virtualmin to create a database as part of the account, it will create both the account (with website, mail, whatever) and database.

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