Sometimes, we need to find and replace certain strings or pieces of data in MySQL on the fly, for example if we’ve changed a Top Level domain (TLD) and want to update a bunch of links all in one go. For those times, the following command can be issued:
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
This can be used, for example, to update strings contained in WordPress posts, such as a lot of links which you’d like to send to another domain. If you’d like specific code examples for doing this, please leave a public comment below, and I’ll update with this info.