- Stop mysql server
- Copy contents of datadir to another location on disk (~/mysqldata/*)
- Start mysql server again (downtime was 10-15 minutes)
- compress the data (tar -czvf mysqldata.tar.gz ~/mysqldata)
- copy the compressed file to new server
- install mysql (don't start)
- unzip compressed file (tar -xzvf mysqldata.tar.gz)
- move contents of mysqldata to the datadir
- Make sure your innodb_log_file_size is same on new server, or if it's not, don't copy the old log files (mysql will generate these)
- Start mysql