Find and Replace in a MYSQL Database
If you have ever tried to move a Site to a new domain or server then you have probably had to dig through the database and change any instances of the old domain name to the new one. THe following sql will help you do a find and replace in the database. This is great for moving a developement site to production. Any way here it is.
UPDATE <tableName> SET <columnName> = replace(<columnName>, 'http://www.old-domain.com','http://www.new-domain.com');
Modify this to your needs.
