Skip to content

Databases

phpMyAdmin without fear

Confirm rows with SELECT, export a gzip first, and remember you still have DROP rights.

Updated Aug 29, 20263 min read11 reads
phpMyAdmin without fear
Use phpMyAdmin carefully on your cPanel databases

You can use phpMyAdmin without fear when you treat every change as reversible and confirm the rows first. cPanel opens phpMyAdmin as the database user you pick from the dropdown, not as root. On shared hosting that account can still run DROP TABLE, DROP DATABASE, and an UPDATE with no WHERE clause. Export a gzip backup first, then run a SELECT with the same WHERE before you change anything.

What account you are logged in as

On shared hosting, phpMyAdmin is not MariaDB root. It is the MySQL user attached to that database under cPanel → MySQL Databases. Privileges such as FILE, SUPER, and GRANT OPTION are usually off, but DROP is not. Treat the screen as an authenticated admin tool that shares the same session as the rest of cPanel. Do not leave it open on a shared or public computer, and close the tab when you step away.

Back up before you drop or rewrite data

A DROP without a dump is hard to undo cleanly. Account backups run on a daily cycle, so they are not a last-second safety net. If you drop a table in the afternoon and the last snapshot ran overnight, newer orders or posts may already be missing from our copy. Export the table yourself before you touch it: open phpMyAdmin → Export and choose gzip, or use mysqldump over SSH if the account has shell access. Keep that file outside public_html so it is not web-reachable.

How to use the SQL tab safely

  1. Write the SELECT that matches the rows you intend to change.
  2. Read the row count. If it is the whole table, your WHERE clause is wrong.
  3. Only then rewrite that SELECT as UPDATE or DELETE.
  4. If the change is not easy to reverse, download a gzip of that table first.

Schema changes such as DROP, ALTER on a large table, or TRUNCATE belong on a copy, or at least after an export you already have locally. phpMyAdmin will lock tables like wp_options if you ask it to during busy traffic, and that is expected behavior rather than a product bug.

Least privilege belongs on the MySQL user itself, not only in careful clicking. See MySQL users and least privilege for how to tighten those grants.

Share

Send this article

Need someone else to do this? Send them the link — the commands are in the article.

Was this article helpful?

Be the first to rate this article.