How to register an existing MySQL/MSSQL database in Plesk for Windows? Print

  • 0

You may face a situation where you have the MySQL or MSSQL database on servers but not showing in the Plesk Panel at Domains >> Your_domain_name >> Databases.

Please refer to the following steps to register your existing databases on the servers to the Plesk panel. 

  1. Log in to your Windows server via RDP. Please refer to how to connect the windows server via RDP.

  2. Go to the Run and type cmd to open the command prompt.

  3. Run the below command to find-out database servers installed on your server.

    plesk db "SELECT host,port FROM DatabaseServers"
    
  4. Now, run the below command to register the database with your Plesk panel.

    plesk bin database.exe --register db_name -domain
    demovpstest.com -server 173.248.xxx.xxx
  • db_name: Your database name
  • demovpstest.com: Plesk subscription name where the database is going to attach
  • 173.248.xxx.xxx: IP Address of database server
  1. Run the below command to register and attach the database user with your database.

    plesk bin database.exe --register-dbuser db_user -domain
    demovpstest.com -database db_name -user-role readWrite -passwd
    "<password>" -server 173.248.xxx.xxx
  • db_user: Your database username
  • db_name: Your database name
  • password: DB user password
  • 173.248.xxx.xxx: IP Address of database server

Was this answer helpful?

« Back
Sign up for a newsletter

chat