Here is a quick way to find and replace data in a Mysql database across all columns and tables at once. I use this method when I am launching a new wordpress site taking it from dev platform over to production (i would just search and replace the wordpress localhost name with the wordpress production hostname)
Usually to do cross table search and replace requires some complex sql queries which opens you up to the possibility of errors.
This way is much faster.
- Backup your database.
- Do a sql dump of the structure and data into one single sql file or text file
- Open the file in notepad or text editor
- Use the search and replace function from the text editor
- Import the text file back into your database.