Show
4.2.2.2 Using Option FilesMost MySQL programs can read startup options from option files (sometimes called configuration files). Option files provide a convenient way to specify commonly used options so that they need not be entered on the command line each time you run a program. To determine whether a program reads option files, invoke it with the Note A MySQL program started with the A server started with the Many option files are plain text files, created using any text editor. The exceptions are:
Option File Processing OrderMySQL looks for option files in the order described in the following discussion and reads any that exist. If an option file you want to use does not exist, create it using the appropriate method, as just discussed. On Windows, MySQL programs read startup options from the files shown in the following table, in the specified order (files listed first are read first, files read later take precedence). Table 4.1 Option Files Read on Windows Systems
In the preceding table,
Important Although MySQL Installer places most files under On Unix and Unix-like systems, MySQL programs read startup options from the files shown in the following table, in the specified order (files listed first are read first, files read later take precedence). Note On Unix platforms, MySQL ignores configuration files that are world-writable. This is intentional as a security measure. Table 4.2 Option Files Read on Unix and Unix-Like Systems
In the preceding table, If multiple instances of a given option are found, the last instance takes precedence, with one exception: For mysqld, the
first instance of the Option File Syntax The following description of option file syntax applies to files that you edit manually. This excludes
Any long option that may be given on the command line when running a MySQL program can be given in an option file as well. To get the list of available options for a program,
run it with the The syntax for specifying options in an
option file is similar to command-line syntax (see Section 4.2.2.1, “Using Options on the Command Line”). However, in an option file, you omit the leading two dashes from the option name and you specify only one option per line. For example, Empty lines in option files are ignored. Nonempty lines can take any of the following forms:
Leading and trailing spaces are automatically deleted from option names and values. You can use the escape sequences
The preceding rules mean that a
literal backslash can be given as The rules for escape sequences in option files differ slightly from the rules for escape sequences in string literals in SQL statements. In the latter context, if “ The escaping rules for option file values are especially pertinent for Windows path names, which use
If an option group name is the same as a program name, options in the group apply specifically to that program. For example, the The The List more general option groups first and more
specific groups later. For example, a Here is a typical global option file:
Here is a typical user option file:
To create option groups to be read only by
mysqld servers from specific MySQL release series, use groups with names of
Option File Inclusions It is possible to use
To search the
MySQL makes no guarantee about the order in which option files in the directory are read. Note Any files to be found and included using the Write the contents of an included option file like any other option file. That is, it should contain groups of options, each preceded by a While an included file is being processed, only those options in groups that the current program is looking for are used. Other groups are ignored. Suppose that a
And suppose that
If The If an option file contains For inclusion directives to work, the file path should not be specified within quotes and should have no escape sequences. For example, the
following statements provided in
On Windows, if Where are the files stored that contain information for all of the time zones that could be recognized by a Linux operating system?Most Linux distributions keep their timezone information in the directory /usr/share/zoneinfo/. If you list the contents of this directory, you will see a bunch of region directories, such as "Americas" or "Africa".
Which of the following statements should be used at the end of a SQL statement?Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server. In this tutorial, we will use semicolon at the end of each SQL statement.
Which of the following is a valid SQL statement for adding a new row of data?INSERT statements - These add new data into a database table.
Which of the following SQL statements can be used to delete a table from a database group of answer choices?The DROP TABLE command deletes a table in the database.
|