In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Today, what the editor shares with you is the mysqldump command for MySQL database backup. I believe many people do not know much about it. In order to make you understand better, I summarized the following contents for you. Let's look down together. I'm sure you'll get something.
The mysqldump command is a backup tool in a MySQL database that is used to export a database in a MySQL server in a standard sql language and save it to a file.
Syntax format: mysqldump [parameters]
Common parameters:
-add-drop-table adds statements to delete database tables before each create database table statement-add-locks locks database tables when backing up database tables-all-databases backs up all databases on the MySQL server-comments adds comment information-compact compression mode Produce less output-complete-insert output completed insert statement-databases specifies the database to be backed up-default-character-set specifies the default character set-force continues the backup operation when an error occurs-host specifies the server to back up the database-before lock-tables backup Lock all database tables-no-create-db forbids the generation of database creation statements-no-create-info prohibits generation of database table creation statements-password for password connection to MySQL server-port number for portMySQL server-user name for user connection to MySQL server
Reference example
Export the entire database:
[root@linuxcool] # mysqldump-u linuxcool-p smgp_apps_linuxcool > linuxcool.sql
Export a table in the database:
[root@linuxcool] # mysqldump-u linuxcool-p smgp_apps_linuxcool users > linuxcool_users.sql
Export a database structure:
[root@linuxcool] # mysqldump-u linuxcool-p-d-- add-drop-table smgp_apps_linuxcool > linuxcool_db.sql the mysqldump command about MySQL database backup is shared here. I hope the above content can be used as a reference for everyone. If you like this article, you might as well share it for more people to see.
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.