There was a problem deleting the database

Metro2

Well-Known Member
May 24, 2006
580
95
178
USA
cPanel Access Level
Root Administrator
As I have many times before, I just logged in to user's cPanel to delete a no longer needed database, it seemed successful, and I removed the DB user as well.

But then the database (with no user) mysteriously came back a couple minutes later while I was working in the user's cPanel.

Tried several times to remove the "ghost" database and it just gives me this error:

There was a problem deleting the database “example_name”. The system user “name” does not control a MySQL database named “example_name”.

(those aren't the actual names of course)

Checked the user's phpMyAdmin from within cPanel, no database there.

Checked WHM > phpMyAdmin and the database is not there either, yet still shows in the user's cPanel.

Anyone else every run into this?


cpanel_cannot_delete_database.png
 
Last edited by a moderator:

Metro2

Well-Known Member
May 24, 2006
580
95
178
USA
cPanel Access Level
Root Administrator
Just in case anyone else encounters this:

I tried this on a whim and it worked - I just quickly created a new database and user via the Wizard, and the "ghost" database disappeared.

I was then able to successfully delete the new database with no issue.

Very odd, and has never happened in the 20~ years I've been running cPanel on my servers.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,235
2,217
363
cPanel Access Level
Root Administrator
Hey there! The most likely explanation is that database was somehow disassociated with the cPanel server. It could have been created manually outside of cPanel, or there could have been an issue with the system at some point.

If this happens again, I'd recommend trying the WHM >> Database Map Tool to see if you can link the existing database to the cPanel user, and then delete it through cPanel normally.
 
  • Like
Reactions: Metro2

Metro2

Well-Known Member
May 24, 2006
580
95
178
USA
cPanel Access Level
Root Administrator
Thanks @cPRex

I was so mystified by the encounter and focused on the fact that it wasn't list in WHM's phpMyAdmin I didn't even think to use the DB Map Tool. smh
 
  • Like
Reactions: cPRex