I would export and import all databases with mysqldump.
Export (on the old server):
- mysqldump -uroot -p --all-databases > alldb.sql
Then you need to copy the alldb.sql file to your new server.
Import (on the new server):
- mysql -u root -p < alldb.sql
When you import the database, the password of the SQL "debian-sys-maint" user will be changed to the password of the old server. You will need to put into the file "/etc/mysql/debian.cnf" the old password from your old server or change the password of the SQL user back to the password before the import.