first enter the folder you need to backup, and then execute the following command
Backup database, ssh command: mysqldump -p database name -u database username> bak.sql ( Can also be the file name you want)
Do not compress backup mysqldump -p database name -u database username> bak.sql
gz compressed backup
mysqldump - p database name -u database username |
Gzip > wuxiaowu.sql.gz
zip compressed backup
mysqldump -p database name -u database username |
Gzip > wuxiaowu.sql.zip
The following of these I have not verified whether it can be used
The following is a summary of the network about MySQL SSH command for database backup and recovery:
Command to back up MySQL database
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
Back up MySQL database to back up MySQL database with format of delete table In the format of the delete table, the backup can overwrite the existing database without manually deleting the original database.
mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql
Direct MySQL database compression backup
mysqldump -hhostname -uusername -ppassword databasename |
Gzip > backupfile.sql.gz
Back up some (some) tables of MySQL database
mysqldump -hhostname -uusername -ppassword databasename specific_table1 specific_table2 > backupfile.sql
Back up multiple MySQL databases at the same time
Mysqldump -hhostname -uusername -ppassword –databases databasename1 databasename2 databasename3 > multibackupfile.sql
Backup only database structure
mysqldump –no-data –databases databasename1 databasename2 databasename3 > structurebackupfile.sql
Backup server All databases
mysqldump –all-databases > allbackupfile.sql
Command to restore MySQL database
mysql -hhostname -uusername -ppassword databasename < backupfile.sql
Restore compressed MySQL database< Br>gunzip < backupfile.sql.gz | Mysql -uusername -ppassword databasename
move the database to the new server
mysqldump -uusername -ppassword databasename |
Mysql –host=*.*.*.* -C databasename Several common database backup instances: 1. Export the entire database mysqldump -u username-p database name> exported file name mysqldump -u root -p dataname > ;dataname.sql will prompt you to enter the password of the root username. After entering the password, the dataname database will be successfully backed up in the current directory. 2. Export a table mysqldump -u username-p database name table name> exported file Name mysqldump -u root -p dataname users> dataname_users.sql3. Export a database structure mysqldump -u wcnc -p -d –add-drop-table smgp_apps_wcnc >d:/wcnc_db.sql-d no data–add- Drop-table Add a drop table4 before each create statement. Import the database common source command into the mysql database console, such as mysql -u root -pmysql> use database and then use the source command, the latter parameter is the script file (as used here) .sql)mysql>source d:/wcnc_db.sql
The Linux boot file is stored in the grub.conf configuration file in the /boot/grub/directory. 1.
In order to ensure the normal operation of the Linux system and accurately solve various system prob
redhat-5.4 U disk installation process Preparation: FbinstTool.exe-softwareredhat-5.4-boot.fba-boot
directory summary: /: root directory, generally only the directory under the root directory, do not
How do I create a logical volume management (LVM) partition using kickstart?
Linux (centos) SSH installation and setup - macos remote connection
Low-key literary lizard: remember SUSE Linux 20th Anniversary
Linux part of the system management command usage summary
Linux limits the number of connections to a single IP port.
The program does not have MySQL reports on the Linux server. Error
Linux common fault handling summary
How to Manage KVM Virtual Environments with Command Line Tools in Linux
Fedora Features - Smolt solves hardware compatibility problems
Modify IP, DNS and other network configurations under Linux operating system
Linux LAMP service rpm package installation and configuration basic tutorial
Ali Wangwang set up quick reply step tutorial
Win10 font sawtooth is very vague and how to eliminate it?
Tips to easily configure Apache security
Sending a Win7 Right-Click Menu to Add a Common Location
DirectDraw can not be disabled under win7
How to modify the photo name in batches
How to shut down Win8? The three easiest ways to shut down Win8