The best way i've come across doing this is with mysqldump. You need to first save the database with mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz] then FTP the backupfile.sql.gz off the server and upload it to whatever server you are transferring it to. Then issue the command to restore the database gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname] I am pretty sure when you're restoring the DB you need to be certain the DB table structure is in place before the restore Goodluck
Or you could use phpmyadmin. There you can export the database with full structure and data to a zipped file. Then from the new server you can import the same zipped file to restore the full file. Please note if your database is huge you won't be able to do this using phpmyadmin as the script execution will get timed out. This is recommended for small db's only. Regards, Sreyas
Recently I have imported a database of 500 MB with just few clicks with BigDump script. Read more and get it here: http://www.ozerov.de/bigdump.php You can export your database quickly with unix commands shown by Progg, from phpMyAdmin or a backup facility provided by host. You can also ask the support people to do it for you.
You Can find backup/restore DATABASE option in Cpanel.. So you can easily backup or move you database
This is for MS SQL Databases. When you said server to server I assume you have full admin control. serverintellect.com/support/sqlserver/sql-database-attach.aspx
If you have cpanel with your old host and same at new host then you can transfer your database through cpanel itself. Most of web hosting companies do it for their clients.