programme I
Suitable for Mysiam tables
Directly tbl_name.frm、tbl_name.myd、tbl_name.myi three files, save, backup can be.
When needed, the direct decompression is moved to the corresponding database directory.
Note that if the same method is used, the InnoDB storage Engine table structure of the file is processed.
show tablesyou can see it when you use it, but you can't use it.
Scenario Two(Common scenario)
The idea is to build and save the structure of the table and the SQL statement that inserted the data. The next time you need the structure and data, execute the data statement directly.
Using the tools provided by MySQL is not part of the SQL language, it does not need to be executed at the MySQL command-line client and can be run directly.
-uroot-p> d:/one.sql
Restore the backed-up database, and restore the SQL statement that you just generated.
Execute directly on the MySQL client.
How do I execute an SQL statement that is stored inside a file?
Using the source directive, you can specify the source code file that needs to execute the SQL statement.
create database bak;usebak;mysql> source d:/one.sql
Common backup operations:
1. Back up the tables in the entire database:
mysqldump -uroot -p testdata > d:/one.sql
2. Back up a table in the database.
mysqldump -uroot -p testdata one > d:/one_one.sql
3. Back up more than one table in the database.
mysqldump -uroot -p testdata one two > d:/one_one.sql
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
MySQL Data backup