The common Backup tool is the mysqldump with MySQL,
The code is as follows |
Copy Code |
Mysqldump-u root-p Password dbname >d:\test.sql------------back up a library Mysqldump-u root-p Password dbname tablename>d:\test.sql------------back up a table under a library Mysqldump-u root-p password--all-databases >d:\test.sql------------back up the entire library |
1. Database backup operation:
MySQL has a lot of ways to import data, but these are only half of that data transfer, and the other thing is to export it from the MySQL database. There are many reasons why we need to export the data. One important reason is to back up the database. The cost of data is often expensive and needs to be handled with care. Backing up frequently can help prevent the loss of valuable data, and another reason is that you might want to export the data to share. In this growing world of information technology, shared data is becoming more common.
For example, Macmillan USA maintains a large database of books that will be published. The database is shared among many bookstores so that they know which books will be published soon. Hospitals are increasingly moving to paperless records so that they can be followed by you at any time. The world is getting smaller, and information is being shared more and more. There are many ways to export data, which are similar to the imported data. Because, after all, these are just a way of perspective. The data that is exported from the database is the data that is imported from the other end. Here we do not discuss the various methods of exporting data from other databases, you will learn how to use MySQL to implement data export
More parameters can be viewed in mysqldump--help