Skip to main content
Hints & TipsNerd-stream

Easily search and replace throughout a (smallish) MySQL database

By September 19, 2012No Comments

Every now and then I need to search through an entire MySQL database, to change a word, term, URL, or some other string.

Rather than searching through the entire database to make the change, I just use phpMyAdmin to export the whole thing as an .sql file, which is of course just plain text.

Open it in a text editor, find and replace in there, then re-upload to phpMyAdmin.

In short, I get it done easily in a bout 45 seconds without having to worry about a typo in an SQL query destroying my data.

Peter

Author Peter

More posts by Peter

Leave a Reply