v-add-database

About v-add-database
add database
Syntax
v-add-database USER DATABASE DBUSER DBPASS [TYPE] [HOST] [CHARSET]

Options
Parameters Parameters Description
USER User that the database will belong to
DATABASE Name of database
DBUSER Database User
DBPASS Database Password
[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

Examples




Notes

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.

  1. First will choose the first host in the list.
  2. Random will chose the host by a chance.
  3. Weight will distribute new database through hosts evenly.

Algorithm and types of supported databases is designated in the main configuration file.




Related Commands




Links
GitHub


Leave a Reply

Your email address will not be published. Required fields are marked *