I have a string that is contained inside of a wordpress install (the name of a server) thousands of times, across multiple columns, records and tables.
I'd like to update it with the location of another server - we are moving the content over.
So the source would be something like http://my-server1/some/link/to/something, and I'd want to replace it with http://my-other-server/some/link/to/something. I'm essentially looking to repeat this process for every instance of http://my-server1.
Is there an easy way to do this in MySQL? A tool? Or do I sadly have to update every record problematically?
Thank you,
Your question has been posted on 2009 and during that year another guy developed a basic php tool to search for a string throughout all the tables of a certain database. Optionally you can also replace all its occurrences with a different string.
Still after 5 years (at time of writing) the use of this tool against a Wordpress installation is effective and much easier in my opinion than using a mysql dump (although you might want to create a dump as well before running the script for backup purposes).
You can find more info in the blog of its author Eric Amundson and in the launchpad's page of the project MySQL Search & Replace
I don't believe you are still looking for an answer after all this time, but I decided to post my hint as well, hoping it can help someone else popping over here in the future still searching for a solution to this issue.