WordPress.org

Ready to get started?Download WordPress

Forums

Search-and-replace in MySQL database (4 posts)

  1. hooopla
    Member
    Posted 9 years ago #

    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 drastic�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.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    That's how I would do it.

    I use Notepad++ and it opens and saves .sql files without a problem so I'm not sure about #3 above.
    #4 is needed, yes - but you've got a backup tucked away somewhere safe haven't you ?

    Risky ? No, not with your procedure.

    I'd wish you good luck, but then you'd worry, so I'll just say "You'll be fine !"

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    In fact ........
    If the corrections are only in one table, you could just export that one table, correct it, drop the old one, import the new amended one.

  4. hooopla
    Member
    Posted 9 years ago #

    Thanks, podz. That makes me feel better.

Topic Closed

This topic has been closed to new replies.

About this Topic