Previous Topic

Next Topic

Book Contents

Managing Databases With Database.exe Utility

Database.exe utility allows you to manage Plesk-controlled databases and database users. Using this utility, you can:

Database.exe is located in %plesk_dir%admin\bin\. Available commands and options are listed in tables below.

Usage:
database.exe command <db_name> [options]

Example of usage:
database.exe --create John_Doe_DB -domain domain1.com -type mysql -passwd "MyPass"

Available commands:

Command

Parameter

Action

Examples

--create or -c

<db_name>

creates a database

To create John_Doe_DB database on somewhere.com domain:

database.exe --create John_Doe_DB -domain somewhere.com type-mysql

--update or -u

<db_name>

updates a database: adds, edits, removes a db user

Examples of updating various domain parameters are provided further down the table

--remove or -r

<db_name>

deletes a database

To remove John_Doe_DB from somewhere.com domain:

database.exe --remove John_Doe_DB -domain somewhere.com

--help or -h

 

displays help on the utility usage

To see help file on the utility usage:

database.exe --help

Available options:

Option

Parameter

Note

Examples

-domain

<domain_name>

domain name (required for creation)

To create John_Doe_DB database on Somewhere.com domain:

database.exe --create John_Doe_DB -domain somewhere.com

-type

<mssql|mysql>

 

type of a database

To specify type of John_Doe_DB as MySQL database:

domain.exe --create John_Doe_DB -domain somewhere.com -type MySQL

-passwd

<passwd>

sets user password

To set John Doe's password for accessing John-Doe-DB database:

database.exe --update John_Doe_DB -passwd JD

-add_user

<login_name>

adds the user with the specified name

To add Jim_Doe user to the list of John_Doe_DB database users:

database.exe --update John_Doe_DB -add_user Jim_Doe

-update_user

<login_name>

updates the user with the specified name

To update user John_Doe:

domain.exe --update John_Doe_DB -update_user John_Doe

-remove_user

<login_name>

removes the user with the specified name

To remove John_Doe user:

database.exe --update John_Doe_DB -remove_user John_Doe

-user_name

<login_name>

sets login name (may be set/specified with the 'update_user' option)

To set login name as JD for John_Doe user of John_Doe_DB database:

domain.exe --update John_Doe_DB -update_user John_Doe -user_name JD

See Also

Creation Utilities

Configuring Server With Init_conf.exe Utility

Changing Control Panel Appearance With Server_pref.exe Utility

Managing IP Addresses With Ipmanage.exe Utility

Client Account Management With Client.exe and Client_pref.exe Utilities

Managing Domains With Domain.exe and Domain_pref.exe Utilities

Managing Web Users With Webuser.exe Utility

Managing Mail Accounts With Mail.exe Utility

Managing Mailing Lists With Maillist.exe Utility

Managing Spam Filtering With Spamassassin.exe Utility

Managing Web Protection For Domain Directories With Protdir.exe Utility

Managing Anonymous FTP Service With Anonftp.exe Utility

Managing Subdomains With Subdomain.exe Utility