- How to import and backup operations for a single library under Linux
1. Import data into the database
Mysql-u Account-P password database <sql script
Mysql-uroot-proot Test
2. Backup the database data
Mysqldump-u Account-p password Database | gzip > Script Path
gzip >/data/htmlbak/test_db_$ (date +%y%m%d). sql.gz
- How to import and backup operations for a single library under Windows
1, the Import database and Linux, just like the SQL script path is different
2, when you do export under Windows can not be directly compressed, need to use WinRAR to compress
Mysqldump-u database user name-p database name > exported database file
"C:\Program files\winrar\winrar.exe" a-r-ep2-ibck-inul-df-t Compressed package name. rar Compressed folder \
Mysqldump-uroot-proot test>d:\mysqlbak\test.sql"C:\Program files\winrar\winrar.exe " a-r-ep2-ibck-inul-DF -T D:\test.rar d:\mysqlbak\
MySQL Import and export data