You've missed the important bit: transfer all the data across. Doing this without downtime is difficult (though not impossible, especially if you're willing to wade into the murky world that is MySQL multi-master replication), if you're willing to survive some downtime you can either do it in one big hit, or database by database (which if you've got lots of separate databases can be a good way to test your migration plan with a small, low-value site rather than blowing everything up in a giant mess).
As far as naming goes, the answer is service CNAMEs -- a CNAME 'db' or 'mysql' or something, that points to your database server.
If you're doing a one-big-cutover (or you only have one database), setup this CNAME now and point to 127.0.0.1, and start changing all your scripts to use the CNAME. Search-n-replace or whatever is needed (also take the opportunity to centralise this sort of configuration if -- as it sounds like -- you've hard-coded your DB info in lots of separate scripts, in case you have to do something like this again in the future), but without actually moving any data to the new server. Once everything's running through the CNAME, then you can start moving things around, and it's a lot easier to change the CNAME at the end of the maintenance rather than having to change a thousand scripts while in a maintenance window.