Be aware that the root server’s name is kept in wp-config.php as well as in the database in a multisite install. So in addition to modifying the database with repl.php, you also need to fix the ‘DOMAIN_CURRENT_SITE’ setting in wp-config.php.
Failing to do so will result in bizarre redirects and odd database failures.