MYSQL Huge Data migration (5TB) from old server to new server
$ mysqldump -h source ... | mysql -h dest ...

I'm assuming:

You have the tow machines (source and dest) set up.
The two machines are &quot;close&quot; (not on opposite sides of the globe) so that network delays, etc would need to be considered
That script would be run on one machine -- either one.
If the versions are different, I cannot predict whether there will be some hiccups based on inconsistencies between versions.  If it fails running on one server, try the other.  If that fails come back with the error message(s).
It will take time because 5TB takes time to read and write.

If the versions are radically different, there could be major changes that we need to discuss.