-
When trying to delete database server at Tools & Settings > Database servers, the following error is shown:
A database server should not be deleted while databases or database users are hosted there
-
In Tools & Settings > Database servers no databases are assigned to the database:
Cause
Plesk database inconsistency.
Resolution
via Plesk interface
-
Go to Extensions > My Extensions > Repair Kit
-
In row Plesk Database press the button Repair:
via SSH
Manual resolution
-
Connect to the server via SSH in case of Linux server or connect to the server via RDP in case of Windows server
-
Find the ID of the database server in question:
select * from DatabaseServers;
-
Use database server ID from step 4. to find remaining database users and databases:
-
Databases:
SELECT id, name FROM data_bases WHERE db_server_id=42;
+—-+————–+
| id | name |
+—-+————–+
| 23 | database_1 |
+—-+————–+
1 row in set (0.00 sec) -
Database users:
SELECT id, login FROM db_users WHERE db_server_id=42;
+—-+————–+
| id | login |
+—-+————–+
| 25 | john_doe |
+—-+————–+
1 row in set (0.00 sec)
-
-
Delete the records found in step 5.:
-
Database:
DELETE FROM data_bases WHERE id=23;
-
Database users:
DELETE FROM db_users WHERE id=25;
-