Search-and-replace in MySQL database
-
I need to make a number of minor spelling corrections in my WordPress database. Before I do this, I would appreciate some confirmation that I’m approaching the task correctly. (I don’t have a lot of experience with MySQL.)
1. Using phpMyAdmin, back up the database (data and structure). Download to local workstation.
2. On a copy of the backup, use UltraEdit (Windows text editor) to replace the strings I want to fix.
3. Save the modified file with unix line endings.
4. Using phpMyAdmin, DROP all the tables in the database. [This is the step I’m worried about. Seems a bit drastica€??but necessary?]
5. Using phpMyAdmin (SQL tab), repopulate the database by uploading the modified file.
Is that about right? Is there anything unnecessarily risky in this approach?
Thanks.
- The topic ‘Search-and-replace in MySQL database’ is closed to new replies.