Question

How to access the Plesk database?

Answer

On Linux

On Plesk 11.0 and older:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

Since Plesk 11.5 the shortcut command is available:

# plesk db

On Windows

To run a single query to the Plesk database, 'dbclient' utility may be used:

C:\> "%plesk_bin%\dbclient" --direct-sql --sql="select * from misc"

Note: Only UPDATE and SELECT queries are supported by dbclient. Also complex queries, e.g. embedded selects, may work incorrectly.

For complex queries it is recommended to log in to the Parallels Plesk database directly. It can be accessed using the following steps, depending on the database provider configured on the current installation.

  1. MySQL database provider:

    Execute the following commands in the command prompt:

    "%plesk_dir%\MySQL\bin\mysql" -P8306 -uadmin -p<plesk_admin_password> psa
    
  2. MS SQL database provider:

    The database can be accessed using the following CLI command:

    C:\Program Files\Microsoft SQL Server\80\Tools\Binn\osql –E
    

    Alternatively, the Microsoft SQL Server Management Studio Express utility can be used.

  3. Jet database provider (MS Access):

    Database file is located at %plesk_dir%\admin\db\psa.mdb. Any utility for viewing MS Access (.mdb) database files may be used. For example:

    http://www.alexnolan.net/software/mdb_viewer_plus.htm

    http://www.softpedia.com/get/Internet/Servers/Database-Utils/MDB-View.shtml

Internal content