Mysqldump Common parameters

Source: Internet
Author: User
# example 1: I need to back up a database named Test, the root password of my database is Redhat. Mysqldump-uroot-predhat Test > test.sql# Reviews: The default mysqldump command (without any parameters) can only back up views, all tables, and data in the database. A generally sound database will contain stored procedures, functions, triggers, and events, and if you want the information to be saved when you back up the database, you need to add additional parameters to do so. -d The function of this parameter is to not save the data. # example 2: I need to back up a database named Test, the root password of my database is Redhat. I just need the structure. mysqldump-d-uroot-predhat Test > test.sql# Reviews: Sometimes we just need to use the data structure of a database, so we can take this parameter. The function of the-t parameter is to export only the data. # example 3: I need to export the data from the ABC table named Test database, the root password of my database is Redhat. Mysqldump-t-uroot-predhat Test > test.sql# Reviews: This parameter is typically used to export data from a table. --add-drop-database the function of this parameter is to add a judgment statement at the time of backup and delete if the target database already exists. --add-drop-table the function of this parameter is to add a judgment statement at the time of backup and delete if the target table already exists.


This article is from the "Last Night Stars" blog, please make sure to keep this source http://yestreenstars.blog.51cto.com/1836303/1680148

Mysqldump Common parameters

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.