WordPress MU is a pain in the ass to migrate.
There is nothing that goes to the table at the table and replaces these URLs. And you want to be careful when editing the sql dump file in case the URL is stored inside any serialized objects or arrays, since then you will destroy the integrity of this data.
If you want to do this directly in MySQL, you can, but it will take a long time. It will also be the safest.
This will be easiest in PHPMyAdmin, even for experienced SQL gurus, because PHPMyAdmin is just convenient because you will often edit the SQL query. Basic request:
Update "table_name" SET "column_name" = REPLACE("column_name","find","replace") WHERE "column_name" LIKE "%find%"
So, in your case for message tables:
Update wp_1_posts SET post_content = REPLACE(post_content,"www.oldurl.com","www.newurl.com") WHERE post_content LIKE "%www.oldurl.com%"
Next, see the postmeta tables. You may encounter a problem if there is serialized data. So, first do a search to see what the data looks like and see if there are any specific fields that you should leave outside of find / replace script. Your update for this table will look like the last:
Update wp_1_postmeta SET meta_value = REPLACE(meta_value,"www.oldurl.com","www.newurl.com") WHERE meta_value LIKE "%www.oldurl.com%"
If you find the fields you want to exclude, change the script like this:
Update wp_1_postmeta SET meta_value = REPLACE(meta_value,"www.oldurl.com","www.newurl.com") WHERE meta_value LIKE "%www.oldurl.com%" AND meta_name NOT IN ('meta_name_1', 'meta_name_2')
The options table must be done manually - you have too many options to fasten something, automating it. Find the siteurl , home and fileupload_url . Look at something else that can also save the values ββand update them manually.
Then update wp_blogs and wp_site accordingly.
MU migration are the things that nightmares are made of. Go slowly, look at everything, and most importantly, do it all in a duplicate of your master data, to check first. The database location is cheap, there is no lost data.