Databases Reference
In-Depth Information
datadir=/home/mysql/data
tmpdir=/home/mysql/tmp
pid_file=/home/mysql/logs/server1.pid
# log server messages to:
log=/home/mysql/logs/server1.main.log
# log errors to this
log_error=/home/mysql/logs/server1.error.log
# log updates to this binary logfile
log_bin=/home/mysql/logs/server1_updates.bin
[client]
socket=/home/mysql/server1.sock
[mysql]
database=mysql
[mysqldump]
all-databases
result_file=/tmp/dump.sql
There are four groups here: one for the server, one for all clients, one for the mysql
program, and one for the mysqldump program. The latter two are both clients, but the
options we want to list in the file aren't common to all clients, so we list them separately.
If an option appears for two applicable groups (for example [client] and [mysql] ), the
more specific setting (here, for [mysql] ) takes precedence.
Lines starting with the hash or pound symbol ( # ) are ignored; this allows you to add
comments to the configuration file to explain entries. Blank lines are also ignored.
Scope of Options
The directives in an options file can apply at different levels depending on where the
options file is located:
System-wide
Settings apply for all MySQL programs on the system.
The default location for a system-wide options file is /etc/my.cnf for Linux or Mac
OS X systems. Under Linux and Mac OS X, the MySQL server and client programs
automatically read in an options file at the default location.
For a Windows system, the possible configuration file paths are <Win
dows_Directory>\my.ini , <Windows_Directory>\my.cnf , C:\my.ini , and C:
\my.cnf . The <Windows_Directory> is the directory Windows is installed in, typ-
ically C:\Windows . Under Windows, current versions of the MySQL server (version
4.1.5 and above) don't actually read in an options file by default, so you should
 
Search WWH ::




Custom Search