MySQL Import and export data

Source: Internet
Author: User
Tags rar import database mysql import

    • 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

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.