FAQs

ID #1025

MySQL Import and Export

1. Export A MySQL Database

This example shows you how to export a database. It is a good idea to export your data often as a backup.

# mysqldump -u username -ppassword database_name > FILE.sql

Replace username, password and database_name with your MySQL username, password and database name.

File FILE.sql now holds a backup of your database, download it to your computer.

2. Import A MySQL Database

Here, we import a database. Use this to restore data from a backup or to import from another MySQL server.

# mysql -u username -ppassword database_name < FILE.sql

Replace the parts in bold with your own information.

This powerful, easy to use command will backup your database. Simply export your data to a safe place for safe keeping.

Tags: -

Related entries:

Last update: 2011-07-31 09:48
Author: EncivaFAQ
Revision: 1.0

{writeDiggMsgTag} {writeFacebookMsgTag} {writePrintMsgTag} {writeSend2FriendMsgTag} {writePDFTag}
{translationForm}
Rate this FAQ

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

18 users online | 18 Guests and 0 Registered

powered by phpMyFAQ 2.7.1 |