[MySQL] specifies Program Options

Source: Internet
Author: User

Use Option parameters on the command line

There are several principles for using options in the command line:

(1) The option is followed by the command name.

(2) There are two options: Long Name and short name.

Shell long name format: mysql-uroot-p -- execute = "select * from user" testdb

Shell short name format: mysql-uroot-p-e "select * from user" testdb

(3) Command Options are case sensitive.


Use Option files

MySQLProgramYou can read the startup options from the options file (also known as the configuration file. The option file provides a convenient way to specify common options. Therefore, you do not need to enter the option from the command line each time you run the program.

In shell scripts, you can use the my_print_defaults program to analyze the option file. Print the options in the clien and MySQL groups as follows:

In UNIX, the MySQL program reads startup options from the following files:

(Refer to the MySQL official documentation ).

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.