How to unlink a database from Plesk without removing it from the server?

Follow

Comments

2 comments

  • Avatar
    Sathiya

    This script is not showing MSSQL databases list. is it only for MySQL

  • Avatar
    Alexandr Redikultsev (Edited )

    Hi, @Sathiya.

    It should be showing all the databases registered in Plesk, MySQL, PostgreSQL and MS SQL. it is possible to alter the query to show the database server type like this:

    C:\> mysql> SELECT db.id AS DB_ID,db.name,dbu.id AS DB_USR_ID,dbu.login,d.name AS Domain, db.type as Type FROM data_bases db JOIN db_users dbu ON db.id = dbu.db_id LEFT JOIN domains d ON db.dom_id = d.id;
    +-------+-----------+-----------+----------+-------------+-------+
    | DB_ID | name     | DB_USR_ID | login      | Domain | Type      |
    +-------+-----------+-----------+----------+-------------+-------+
    | 1     | mysql_db | 1         | usr1  | example.com | mysql     |
    | 2     | mssql_db | 2         | usr2  | example.com | mssql     |
    +-------+-----------+-----------+----------+-------------+-------+
    2 rows in set (0.00 sec)

Please sign in to leave a comment.

Have more questions? Submit a request