Dec 102008

It happens sometimes that due to database migration, you see spurious characters in MySQL tables and you would like to intervene massively (thick for instance to forums) and replace them with proper characters.

Luckily this is easily doable if you manage to have connection to DB with command line interface or web based system allowing you to issue SQL statements.

Command to use is:

update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, ‘find this string’, ‘replace found string with this string’);

  One Response to “Replace characters in MySQL”

  1. Very nice
    awesome man
    this is the thing i have been looking for last 2 hours.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>