The database.exe utility serves to manage databases and database user accounts used by Plesk domains. The utility allows the following operations:
Syntax
database.exe <command> [<db_name>] [
<option1><param> [<option2><param>]…[<option N><param>]
]
Example
The following command creates the MySQL database jdoe-gallery on domain1.com.
>database.exe --create jdoe-gallery -domain domain1.com -type mysql
Commands
Command |
Parameter |
Description |
Example |
|
|---|---|---|---|---|
|
|
Creates a database with the specified name. |
To create the John_Doe_DB database on somewhere.com: >database.exe --create John_Doe_DB -domain somewhere.com type-mysql or >database.exe -c John_Doe_DB -domain somewhere.com type-mysql |
|
|
|
Updates the database: adds, edits, removes a db user. |
To update the John_Doe_DB database with a new use: >database.exe --update John_Doe_DB -add_user Jim_Doe or >database.exe –u John_Doe_DB -add_user Jim_Doe |
|
|
|
Deletes the specified database. |
To remove the John_Doe_DB database from somewhere.com: >database.exe --remove John_Doe_DB -domain somewhere.com or >database.exe -r John_Doe_DB -domain somewhere.com |
|
|
|
Displays help on the use of the utility. |
To see the help info on the use of this utility: >database.exe -–help or >database.exe –h |
|
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the domain name. Required when creating a database. |
To create MySQL database jdoe-gallery on domain1.com. >database.exe --create jdoe-gallery -domain domain1.com -type mysql |
|
|
Specifies the type of the database. Either the |
To create MySQL database jdoe-gallery on domain1.com. >database.exe --create jdoe-gallery -domain domain1.com -type mysql |
|
|
Specifies the database server on which the database resides. Either the |
To create MySQL database jdoe-gallery for domain1.com on the local MySQL server. >database.exe --create jdoe-gallery -domain domain1.com -server localhost:3306 |
|
|
Sets the DB user password. Required when creating a database user. Used with either the |
To change password to 123456 for the DBadmin user of the jdoe-gallery database: >database.exe --update jdoe-gallery -update_user DBadmin -passwd 123456 |
|
|
Creates a database user. Requires use of the |
To create the Jim_Doe user of the jdoe-gallery database users: >database.exe --update jdoe-gallery -add_user Jim_Doe -passwd ghTTfs65Rfs |
|
|
Changes the DB user credentials (password and/or login name). |
To rename the DBadmin user of the jdoe-gallery database to DBA: >database.exe --update jdoe-gallery -update_user DBadmin -user_name DBA |
|
|
Removes the DB user with the specified name from the database. |
To remove the John_Doe DB user: >database.exe --update John_Doe_DB -remove_user John_Doe |
|
|
Sets the login name for the DB user. Used with the - |
To rename the DBadmin user of the jdoe-gallery database to "DBA": >database.exe --update jdoe-gallery -update_user DBadmin -user_name DBA |