Oracle 5.0 Reference Manual page 258

Table of Contents

Advertisement

Specifying Program Options
The preceding rules mean that a literal backslash can be given as "\\", or as "\" if it is not followed by
a valid escape sequence character.
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 "x" is not a value escape sequence character,
"\x" becomes "x" rather than "\x". See
Section 9.1.1, "String
Literals".
The escaping rules for option file values are especially pertinent for Windows path names, which use
"\" as a path name separator. A separator in a Windows path name must be written as "\\" if it is
followed by an escape sequence character. It can be written as "\\" or "\" if it is not. Alternatively, "/"
may be used in Windows path names and will be treated as "\". Suppose that you want to specify a
base directory of
in an option file. This can be
C:\Program Files\MySQL\MySQL Server 5.0
done several ways. Some examples:
basedir="C:\Program Files\MySQL\MySQL Server 5.0"
basedir="C:\\Program Files\\MySQL\\MySQL Server 5.0"
basedir="C:/Program Files/MySQL/MySQL Server 5.0"
basedir=C:\\Program\sFiles\\MySQL\\MySQL\sServer\s5.0
If an option group name is the same as a program name, options in the group apply specifically to
that program. For example, the
and
groups apply to the
server and the
[mysqld]
[mysql]
mysqld
client program, respectively.
mysql
The
option group is read by all client programs (but not by mysqld). This enables you to
[client]
specify options that apply to all clients. For example,
is the perfect group to use to specify
[client]
the password that you use to connect to the server. (But make sure that the option file is readable and
writable only by yourself, so that other people cannot find out your password.) Be sure not to put an
option in the
group unless it is recognized by all client programs that you use. Programs
[client]
that do not understand the option quit after displaying an error message if you try to run them.
Here is a typical global option file:
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
key_buffer_size=16M
max_allowed_packet=8M
[mysqldump]
quick
The preceding option file uses
syntax for the lines that set the
var_name=value
[458]
and
[466]
variables.
key_buffer_size
max_allowed_packet
Here is a typical user option file:
[client]
# The following password will be sent to all standard MySQL clients
password="my_password"
[mysql]
no-auto-rehash
connect_timeout=2
[mysqlhotcopy]
interactive-timeout
If you want to create option groups that should be read by
servers from a specific MySQL
mysqld
release series only, you can do this by using groups with names of [mysqld-4.1], [mysqld-5.0],
and so forth. The following group indicates that the
option should be used only by MySQL
--new
servers with 5.0.x version numbers:
238

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents