Web Hosting Help - Technical Questions


You're currently browsing the answers and replies to a question asked related to technical questions. If you wish to post a better answer or share greater insight into this question, feel free to post it.


Posted On: Sun 14 November, 2004
Asked By: Ian Smith

Does anyone know how to backup a MySQL database and transfer it to another server?



Posted On: Tue 16 November, 2004
Answered By: Sam Lee

There are a couple of methods that you can employ to backup or/and transfer your existing MySQL database(s) to another server. You can either use a third party tool or use the in-built dump tool bundled with MySQL.

Firstly, your can use the free PhpMyAdmin web-based tool that your web host may already have installed, or you can install yourself. PhpMyAdmin is a MySQL administration tool written in PHP to manage and manipulate MySQL databases. This option is available under the “export” section of the PhpMyAdmin. It is important to select the appropriate database (if you have more than one), choose the “SQL” format and I also highly recommend that you zip the file up as it can save you bandwidth and time to download the backup file. On the new server, just create a new database and restore the database from the SQL backup - remember to unzip the file and extract the backup before restoring it.

Another method is to use the MySQL dump tool that comes with the initial installation. All you have to type in the command line environment or UNIX shell environment is:

mysqldump -u [username] -p [password] --opt [databasename] > backup.sql

On the new server, you can restore the database by inputting the following command:

mysql -u [username] -p [password] < backup.sql

The options in brackets need to be filled out with the appropriate information, such as, the username and password. It is also a good idea to take a "dump" of your database regularly for backup purposes in case the server fails or you have a corrupt database.



Do you have an answer or something to share as well regarding this question?

 

 

 

August's top web hosting companies and services.



Affiliate Links




Policies: Privacy Policy  ·  Terms of Use
Web Vendor: Login  ·  Register Account  ·  Retrieve Password

©2002-2004 Copyright. Host Byte Marketplace.

Website Hosting  ·  Web Hosting Software  ·  Web Hosting Reviews