Linux and UNIX Systems Configuration Help, How To, Tutorial and Basic Information

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
Home How To Database
Database
How to Export, Backup Or Dump A MySQL Database PDF Print E-mail
Thursday, 03 December 2009 13:03
AddThis Social Bookmark Button

To export a MySQL database into a dump file, simply type the following command syntax in the shell.

mysqldump -u username –ppassword database_name > dump.sql

Replace username, password, database_name and dump.sql as your needs. All data, tables, structures and database of database_name will be backed up into a mentioned file dump.sql.
IMPORTANT: Don't put space after -p and the password

 
How to Export A MySQL Database Structure PDF Print E-mail
Thursday, 03 December 2009 13:02
AddThis Social Bookmark Button

If You need to export only the MySQL database's tables’ structures use –no-data switch.

mysqldump -u username -ppassword –no-data database_name > dump.sql
 
How to Backup Only Data of a MySQL Database PDF Print E-mail
Thursday, 03 December 2009 13:00
AddThis Social Bookmark Button

For exporting MySQL database's only the data, use –no-create-info option. The dump will not re-create the database, tables, fields, and other structures when importing.

mysqldump -u username -ppassword –no-create-info database_name > dump.sql

IMPORTANT: Use this only if you sure that you have a duplicate databases with same structure.

 
How to Export A MySQL Database Structures PDF Print E-mail
Thursday, 03 December 2009 12:59
AddThis Social Bookmark Button
If You need to export only the MySQL database's tables’ structures use –no-data switch. mysqldump -u username -ppassword –no-data database_name > dump.sql
 
how to Backup MySQL databases PDF Print E-mail
Thursday, 03 December 2009 12:58
AddThis Social Bookmark Button
There are two methods to backup MySQL, first method is by copying all files such have extentions *.frm, *.MYD, and *.MYI, and second is by using mysqlhotcopy utility, this methods are only for MyISAM tables.
 
<< Start < Prev 1 2 Next > End >>

Page 1 of 2

Latest News

Friends

Thanks David Ayvazyan for provided useful information and discussions.
www.gnu.am (Armenian Translation)