• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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