79615

79615



Specifying Program Options

There are several ways to specify options for MySQL programs:

•    List the options on the command linę following the program name. This is common for options that

apply to a specific invocation of the program.

•    List the options in an option file that the program reads when it starts. This is common for options

that you want the program to use each time it runs.

•    List the options in environment variables (see Section 4.2.4, “Setting Environment Variables").

This method is useful for options that you want to apply each time the program runs. In practice,

option files are used morę commonly for this purpose, but Section 5.6.3, “Running Multiple MySQL

Instances on Unix”, discusses one situation in which environment variables can be very helpful. It

describes a handy technique that uses such variables to specify the

TCP/IP port number and Unix

socket file for the server and for Client programs.

Options are processed in order, so if an option is specified multiple times, the last occurrence takes

precedence. The following command causes mysql to connect to the server running on localhost:

shell>mysql -h example.com -h localhost

If conflicting or related options are given, later options take precedence over earlier options. The

following command runs mysql in “no column names" modę:

shel1>mysql —column-names --skip-column-names

MySQL programs determine which options are given first by examining environment yariables, then by

reading option files, and then by checking the command linę. This means that environment yariables

have the lowest precedence and command-line options the highest.



Wyszukiwarka

Podobne podstrony:
What Do Genetic Tests Really Cost? Often there are multiple ways to test for a given genetic syndrom
domek 2 There are two ways from the park to home, Can you find both?
s&h 007 PBEFACH There are two ways of writiug and ar-l-auging a succt.-s.sfnl hook. One is to siiupl
s&h 007 PBEFACH There are two ways of writiug and ar-l-auging a succt.-s.sfnl hook. One is to siiupl
Publishing.com There are a Zilyon stories to tell... What s yours?
There are still opportunities to do moręWhat s next? a ■    Accelerated

więcej podobnych podstron