This function can be used to assign a database to a customer’s web hosting subscription. The return value is the ID of the new data record. If an identical database already exists in the subscription, its ID is returned.
The database is only created if the create
parameter is set to 1
- in this case the password field is mandatory. If create=0
(default), the database is only included in LiveConfig, but not created on the database server - this is required if the database accounts are / were created otherwise.
The password (if specified) can be up to 40 characters long. As an exception, a 41-character, pre-hashed MySQL password (starting with „*“) can be passed. If the password is exactly 22 characters long and begins with MYSQL:
, this is interpreted as a MySQL 4.x password hash and is also adopted unchanged.
Field |
Type |
RegExp |
Null? |
Description |
---|---|---|---|---|
|
AuthData |
no |
Authentication data |
|
|
string |
|
no |
Subscription name |
|
string |
|
no |
Database name |
|
string |
|
no |
Database login |
|
string |
|
yes |
Description (optional) |
|
integer |
|
yes |
External database access allowed? ( |
|
integer |
|
yes |
Create database? ( |
|
string |
|
yes |
Password (mandatory when |
Field |
Type |
Null? |
Description |
---|---|---|---|
|
string |
no |
Data record ID |
The data record ID is customer-specific encrypted.