- Plesk for Linux
The following error is shown on Plesk UI upon attempting to remove a database:
PLESK_ERROR: Error: Unable to remove some of the selected databases. There is no such grant defined for user 'magento_2' on host '%'
PLESK_ERROR: Error: Unable to remove some of the selected databases. Error dropping database (can't rmdir ./
magento_ain this case, directory isn't empty:
# ls -l /var/lib/mysql/magento_a/ | wc -l
The file encountered in the database's directory
/var/lib/mysql/magento_a/ is not being managed by MySQL.
Connect to the server via SSH.
Move files from the database directory into another one:
# mkdir /root/db_backup/
# mv /var/lib/mysql/magento_a/* /root/db_backup/
Open Domains > example.com > Databases:
Find the affected database, e.g
magento_a, and open the corresponding user, e.g
Change Role to Read Only and confirm changes:
Change Role back to Read and Write.
Remove the database.