mysql backup command

2010-10-08  来源:本站原创  分类:Database  人气:118 

Restore or import the database command:

mysql-u root - password = root

Backup database command:

mysqldump-u root - password = root - database helloworld> helloworld_backup.sql

Other uses:

1. Export the entire database
mysqldump-u username-p database name> Export file name
mysqldump-u wcnc-p smgp_apps_wcnc> wcnc.sql
2. Export a table
mysqldump-u username-p database lists, name> the exported file name
mysqldump-u wcnc-p smgp_apps_wcnc users> wcnc_users.sql
3. Export a database structure
mysqldump-u wcnc-p-d - add-drop-table smgp_apps_wcnc> d: \ wcnc_db.sql

-D no data - add-drop-table before each create statement, add a drop table

4. Import database into mysql database common source command console
If mysql-u root-p

mysql> use database

Then use the source command, followed by arguments for the script file (such as used here. Sql)
mysql> source d: \ wcnc_db.sql

相关文章
  • mysql backup command 2010-10-08

    Restore or import the database command: mysql-u root - password = root Backup database command: mysqldump-u root - password = root - database helloworld> helloworld_backup.sql Other uses: 1. Export the entire database mysqldump-u username-p database

  • import and export mysql backup command 2010-10-07

    Several common use cases: First, backup the database: (DOS command in the mysql \ bin directory under the Executive) mysqldump - opt school> school.bbb Note: the database backup to school.bbb school files, school.bbb is a text file, the file name of

  • mysql database backup command summary 2010-08-14

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete the table with the format of the backup MySQL database table with a delete format allows coverage of the existing datab

  • mysql backup and restore database command 2010-10-13

    mysql backup database command with cmd command first open a command window and enter the appropriate command A remote database backup mysqldump-u root-p [Password]-h [hostIp] databaseName> c: / backup.sql 2 local database backup mysqldump-u root-p [P

  • mysql backup and restore command 2011-01-12

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete a table format with the backup of MySQL database to delete the table with a format that allows the backup overwrite the

  • MySQL database backup command has several practical applications 2011-02-22

    The following article focuses on the MySQL database backup commands the practical application, in practice we all know that MySQL database backup is essential, so it has a more in-depth understanding is essential, the following is description of the

  • mysql backup and recovery strategy 2010-04-02

    In the database table is missing or corrupted, the backup of your database is very important. In the event of system crashes, you want to lose your table at least as far as possible the data back to the time of the collapse of the state. This article

  • [Zz] mysql backup and restore 2010-04-12

    This article discusses the MySQL backup and recovery mechanisms, and how to preserve data tables, including the two most important table types: MyISAM and Innodb, paper, design MySQL version 5.0.22. MySQL support for the current backup tools free: mysqldu

  • MySQL backup and recovery 2010-04-13

    <script src="misc/cr.js" type="text/javascript"> </ script> This article discusses the MySQL backup and recovery mechanisms, and how to preserve data tables, including the two main types of table: MyISAM and Innodb, paper,

  • mysql backup and restore related 2010-05-14

    Under the Internet example, a java program to see that the database and source code, comes with instructions describing the database is so mysql-u root-p databasename <microerp-mysql.sql import table structure and data mysql data backup and restore c

  • Mysql backup and recovery methods 2010-07-09

    Mysql backup and recovery method (1) 2010-06-12 10:04 Summary This detailed analysis of the MySQL backup and recovery mechanisms, and how to preserve data tables, including the two main types of tables: MyISAM and Innodb, paper, design MySQL version

  • Installation and use of MySQL backup percona launched Xtrabackup 2011-05-05

    First, the installation XtraBackup If it is 32-bit systems, the default will xtrabackup0.9.zip content into mysql's bin directory. Compile the database can also be compiled together to 5.0.88 as an example: First download the source code: http://www.

  • [Transfer] MySQL backup and restore commands used 2011-05-12

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete a table format with backup MySQL database <br /> table format with the deletion, allowing the backup overwrite the

  • Mysql export command mysqldump remotely 2010-10-20

    A project is very unfortunate, very painful items to change. Very frustrating to export data from a remote database backup 1 did not like the phpmyadmin database management tools can be used. 2 Only a ftp. Three. Can only upload to a aspx site. Can o

  • Mysql backup and restore commands used (reproduced) 2011-02-22

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete a table format with the backup of MySQL database to delete the table with a format that allows the backup overwrite the

  • Mysql backup database statement 2011-02-24

    mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete a table format with the backup of MySQL database to delete the table with a format that allows the backup overwrite the existing database without the

  • Installation and use percona introduced Xtrabackup MySQL backup 2011-05-05

    First, install XtraBackup If it is 32-bit systems, the default will xtrabackup0.9.zip content into the mysql bin directory. You can also compile a database compiled together to 5.0.88, for example: First download the source code: http://www.percona.c

  • MySQL backup and recovery (transfer) 2011-06-16

    As / Translator: Ye Jinrong, source: http://imysql.cn, reproduced, please indicate as / translator and the source, and can not be used for commercial purposes, rights reserved. This article discusses the MySQL backup and recovery mechanisms, and how

  • MySql backup data regularly 2011-08-08

    Scripts available (has been being used), wrote @ Echo taking date, time, variable values set yy =% date: ~ 0,4% set mm =% date: ~ 5,2% set dd =% date: ~ 8,2% if / i% time: ~ 0,2% lss 10 set hh = 0% time: ~ 1,1% if / i% time: ~ 0,2% geq 10 set hh =% t

  • MySql backup and restore commands used 2011-09-02

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database to delete a table format with <br /> delete backup MySQL database table format for the band, allowing the backup overwrite th