If you have a customer that deleted an application that was installed via the Plesk applications, but the database did not delete, and it will not allow you to delete it, then you need perform the following steps:
- SSH to the server
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
use psa
select id from data_bases where name="databasename";
- databasename is the database that you are trying to delete
select app_id from siteappresources where type=’database’ and res_id="id";
- ID is the ID from the first result
delete from siteappresources where app_id="app_id";
- APP_ID is from the 2nd result
Once you have run these commands, you should now be able to delete the database from within the customers plesk.