Knowledgebase

Common Database Mistakes Print

  • databasesphpmyadmin, databases, database, backup, migration, performance, errors, troubleshooting
  • 0

What goes wrong.

RUNNING UPDATE OR DELETE WITHOUT A WHERE CLAUSE

Changes or removes every row. No undo.

The prevention is running the SELECT first, with the same condition.

NOT BACKING UP BEFORE A CHANGE

The only undo available, and it takes thirty seconds.

PLAIN SQL SEARCH AND REPLACE ON SERIALISED DATA

Corrupts settings silently. Use a serialisation-aware tool.

IMPORTING OVER EXISTING DATA

Produces duplicate key errors and a mixture. Drop the tables first.

FORGETTING THE PREFIX

The most common configuration error, particularly after a migration.

USING ONE DATABASE USER FOR EVERYTHING

One application's vulnerability exposes all of them.

LEAVING A DUMP IN A PUBLIC DIRECTORY

Anyone guessing the URL takes your entire database, including user accounts.

EDITING WHAT THE APPLICATION SHOULD MANAGE

Leaves related data inconsistent.

IGNORING GROWTH

A database that is mostly bloat, slowing everything, unnoticed for years.

ASSUMING BACKUPS WORK

Untested dumps that turn out to be truncated.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot