Renaming databases in phpMyAdmin leading to backup failures

Dhaupin

Active Member
Jan 3, 2014
41
4
8
cPanel Access Level
Root Administrator
Thanks for adding that protection in v64.

I just ran into the backup failure again this morning due to a database being renamed in PHPMyAdmin (PMA). I am curious about this: Why are we letting 1 user take down a whole server with settings that are known to conflict? PMA is an excellent and dare I say essential tool for many users, but if it's so easy to conflict with cPanel -- risky to allow.

If database schema inconsistency is causing such an issue with backup corruption, why are those features even allowed in PMA? For example, there is no way to manage users in the cPanel build of PMA, the tab is completely gone, I assume in order to prevent collisions with the cPanel DB system/API. While using PMA in domain/account level cPanel however, a user still has the option to "rename database" under Operations. Or if root, the option to drop database. Renaming the DB via PMA means that cPanel won't find it (since it still thinks its the old name).

Wouldn't it be less volatile if that option were removed? Or if not removed, how about a nice fat warn + validate checkbox "renaming or deleting databases from the PHPMyAdmin interface could corrupt the cPanel database handler, resulting in server backup failures. Please drop/rename via the cPanel interface instead. Check 'I Understand the Risk' to continue."

In addition, a warn on the export/import tabs stating a similar situation + validate checkbox "Full import or import database creation from the PHPMyAdmin interface could cause discrepancies within the cPanel database handler, resulting in server backup failures. It is recommended that you use the cPanel interface for any database export/import. Check 'I Understand the Risk' to continue."
 
  • Like
Reactions: SageBrian

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello @Dhaupin,

I moved this post to it's own thread so we can address the issue separately.

Could you verify which version of cPanel is installed on the system? You can check with a command such as:

Code:
cat /usr/local/cpanel/version
I'm unable to reproduce the issue with the following steps:

1. Created a MySQL database via "cPanel >> MySQL Databases".
2. Accessed phpMyAdmin for the account, clicked on the database I created, and browsed to the "Operations" tab.
3. Renamed the database.

Upon checking, the new database name is populated in all of the required configuration file, and shows up under the list of databases in cPanel. Additionally, the database is correctly packaged in the account's backup archive with the new name. Are you using different steps to reproduce the issue?

Thank you.
 

Dhaupin

Active Member
Jan 3, 2014
41
4
8
cPanel Access Level
Root Administrator
Hmm interesting. It was cPanel v62 at the time of post. Just upgraded to v64 today on that server.

Perhaps the user did something different. I saw that the backup was unsuccessful because it couldn't find the DB and upon inspection it looked like a rename. In PMA it was 1 name, and in cPanel a different name. Ill let you know if I am able to replicate it.