When I move my site which uses a MySQL database, how would I move the whole database from the old MySQL server to the new one? URL
You could use mysqldump to export the current db to textfile format, and import the output from mysqldump on your new server using the following:
mysqldump -p mydb --add-drop-table > mydb.sql (on your current server)
then upload the file mydb.sql to your new server (you could use gzip to compress it)
mysql -p mydb < mydb.sql (on your new server)
Was this answer helpful ?
Yes No