Search and Replace with MySQL

Every once in a while, you might find that you need to find a string or value in your MySQL database and replace it with a new value throughout. For instance, let’s say you decide to move your MySQL-based Web site from one domain to another, and now all of the links you had stored in the database are broken, because they still point to your old domain.

MySQL offers an extremely simple solution to this problem. Here is a code snippet that shows you how to do so: