In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces some commonly used backup commands of MySQL database, the contents of the article are carefully selected and edited by the author, with a certain pertinence, the reference significance for everyone is still relatively great, the following with the author to understand some common backup commands of MySQL database.
Commands for backing up MySQL databases
The code is as follows:
Mysqldump-hhostname-uusername-ppassword databasename > backupfile.sql
Back up the MySQL database in a format with deleted tables
The backup MySQL database is in the format with deleted tables, which allows the backup to overwrite the existing database without manually deleting the existing database.
The code is as follows:
Mysqldump-- add-drop-table-uusername-ppassword databasename > backupfile.sql
Compress backup of MySQL database directly
The code is as follows:
Mysqldump-hhostname-uusername-ppassword databasename | gzip > backupfile.sql.gz
Back up some table (s) in the MySQL database
The code is as follows:
Mysqldump-hhostname-uusername-ppassword databasename specific_table1specific_table2 > backupfile.sql
Backup multiple MySQL databases at the same time
The code is as follows:
Mysqldump-hhostname-uusername-ppassword-databases databasename1databasename2 databasename3 > multibackupfile.sql
Just back up the database structure
The code is as follows:
Mysqldump-no-data-databases databasename1 databasename2 databasename3 > structurebackupfile.sql
Back up all databases on the CVM
The code is as follows:
Mysqldump-- all-databases > allbackupfile.sql
Commands for restoring MySQL databases
The code is as follows:
Mysqlc:/beifen.sql
After reading some of the common backup commands about MySQL database, many readers must have some understanding. If you need more industry knowledge and information, you can continue to follow our industry information column.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.