& Amp; non-essential parameter _ MySQL

Source: Internet
Author: User
Required parameter for mysqldump dumping

BitsCN.com

Required and optional parameters for mysqldump dumping

Required parameters for mysqldump dumping:

E.g.

C:/Documents and Settings/zhuolangkeji> mysqldump-uxxxx-pxxx-h 172.26.3.109-P 3306-c-e-B task> c:/task. SQL

-- User,-u

Specify the connection user name.

-- Port,-P

Database connection port number

-- Password,-p

Database connection password

-- Host,-h

Host Information to be exported

Mysqldump-uroot-p -- host = localhost -- all-databases

-- Add-drop-database

Add the drop database statement before each database is created.

Mysqldump-uroot-p -- all-databases -- add-drop-database

-- Complete-insert,-c

Use the complete insert statement (including the column name ). This can improve the insertion efficiency, but may be affected by the max_allowed_packet parameter, resulting in insertion failure.

Mysqldump-uroot-p -- all-databases -- complete-insert

-- Extended-insert,-e

Use the INSERT syntax with multiple VALUES columns. In this way, the exported file is smaller and the import speed is accelerated. Enabled by default

Mysqldump-uroot-p -- all-databases

Mysqldump-uroot-p -- all-databases -- skip-extended-insert (cancel option)

-- Databases,-B

Export several databases. All name parameters following the parameter are considered as the database name.

Mysqldump-uroot-p -- databases test mysql

--------------------

Non-essential parameters for mysqldump dumping:

-- Max_allowed_packet

The maximum length of packets sent and received by the server.

Mysqldump-uroot-p -- host = localhost -- all-databases -- max_allowed_packet = 10240

-- Net_buffer_length

The cache size of TCP/IP and socket connections.

Mysqldump-uroot-p -- host = localhost -- all-databases -- net_buffer_length = 1024

-- No-data,-d

Only the database table structure is exported without exporting any data.

Mysqldump-uroot-p -- host = localhost -- all-databases -- no-data

BitsCN.com

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.