v-add-database USER DATABASE DBUSER DBPASS [TYPE] [HOST] [CHARSET]
|USER||User that the database will belong to|
|DATABASE||Name of database|
|[TYPE]||[OPTIONAL] Type of database. defaults to MySQL|
|[HOST]||[OPTIONAL] on which host to create the database on|
|[CHARSET]||[OPTIONAL] Charset in the database, default UTF8|
The function creates the database concatenating parameters USER and DATABASE with a _ in between.
Supported types of databases you can get using v-list-sys-config script.
If HOST isn’t stated and there are more then one hosts configured on the server, the host where the database will be created on is defined by one of three algorithms.
- First will choose the first host in the list.
- Random will chose the host by a chance.
- Weight will distribute new database through hosts evenly.
Algorithm and types of supported databases is designated in the main configuration file.