• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

How does Plesk links a Database to a Domain in Windows registry?

N

netors

Guest
I have PHP scripts that automatically generates MySQL Databases and Users for those databases.

What i want to do, is to be able to create those databases in php but i want them also to be reflected under an specific domain under the Plesk control manager.

I suppose i have to add them in some way to the windows registry in order for the plesk control panel to automatically detect them, but HOW?'

i hope i explained my self. thanks!
 
Plesk keeps all informations regarding the hosted databases and their users in it's configuration psa database. As far as I know, on linux the database needs to be MySQL, but on Windows you can choose between MySQL, MSSQL and MS Access and the MySQL instance is running on port 8306 by default. The tables you're looking for are 'data_bases' and 'db_users' and they're also linked to the 'domains' table, but you'll figure out the rest.

Another option would be to try to run the back-end tool for managing database:
Code:
C:\Documents and Settings\Administrator>cd %plesk_bin%

C:\Program Files\SWsoft\Plesk\admin\bin>database.exe --help

Usage: database.exe command [options]

    Available commands:
    --create or -c     <db_name>       Create database
    --update or -u     <db_name>       Update database: add, edit, remove
                                       database user
    --remove or -r     <db_name>       Delete database
    --help or -h                       displays this help page

    Available options:
    -domain            <domain_name>   Domain name (required for creation)
    -type              <mysql|mssql>   Type of database
    -passwd            <passwd>        Set user password
    -add_user          <login_name>    Add user with given name
    -update_user       <login_name>    Update user with given name
    -remove_user       <login_name>    Remove user with given name
    -user_name         <login_name>    Set login name (may by specified with
                                       "update_user" option)
    -server            <host[:port]>   Specify database server

Version: psa v8.1.1_build20070326.13 os_Windows 5.2.3790.0


C:\Program Files\SWsoft\Plesk\admin\bin>

These are only a few ideas, however if you want to develop an application that will work with future versions of Plesk the best solution is to join the SWsoft Developer Network and try use the Plesk APIs to sync your databases. I'm sure that this is what SWsoft would recommend too.
 
Back
Top