This article mainly introduces the mysqldump command for importing and exporting database methods and instance summary. if you need it, refer to the usage of mysqldump command.
1. export all databases
System command
First, the common operation:
Back up the entire database
Format:MYSQLDUMP-H host name-P Port-u username-p password (–database) database name > filename. sqlMysqldump-h{hostname}-p{port}-u{username}-p{password} {DatabaseName} > {backupfile.sql}For
The mysqldump command is a very good database operation command in mysql. It can back up and restore the database, and is used in almost all database command backups, next I will introduce some usage of mysqldump.
I. Common Operations:
Back up the
In PHP website development, often encounter MySQL database backup or database migration work, then MySQL how to import the data in the export database is very critical, MySQL itself provides command line export tools mysqldump and MySQL SOURCE
Basic import of the database \ Export command is mysqldump and source under Linux directly with the command line operation can be under windows under normal circumstances there are two ways one is to use the command line and the other is to use
In real life, backing up the database on a regular basis is an extremely important task. When we use MySQL, there is a lot of choice in database backup, and this article will show readers how to use MySQL's mysqldump to back up the database.
First,
The mysqldump client can be used to dump databases or collect databases for backup or transfer data to another SQL Server (not necessarily a MySQL Server ). Dump contains table Creation
The mysqldump client can be used to dump databases or collect
In real life, backing up the database on a regular basis is an extremely important task. When we use MySQL, there is a lot of choice in database backup, and this article will show readers how to use MySQL's mysqldump to back up the database.
First,
MySQL BackupCold backup : Stop the service from being backed up, that is, stop writing the databaseHot backup : Do not stop the service for backup (online)L MySQL MyISAM engine only supports cold backup, InnoDB supports hot backup, Reason:InnoDB
The code is as follows
Copy Code
Mysqldump-hhostname-uusername-ppassword databasename > Backupfile.sql
Back up the MySQL database to back up the MySQL database in a format with a delete table in the format with the deleted
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.