Config Files¶
Config files contain these types of lines:
# comment
option-name=value
plugin-name.plugin-option-name=value
[plugin-name]
plugin-option-name=value
Blank lines are allowed, and spaces before and after = are allowed.
The second type of line, option-name=value, specifies Options which add and remove plugins and configure the kernel.
The third type of line, plugin-name.plugin-option-name=value, specifies an option specific to a plugin. Drizzle loads many plugins by default, so many options use this type. If plugins have the same plugin-option-name, they are distinguished by different plugin-name. prefixes. For example:
drizzle-protocol.port=4427
mysql-protocol.port=3306
Those options are not the same. The first sets the Drizzle network protocol port, and the second sets the MySQL network protocol port.
The fourth type of line, [plugin-name], is a header that specifies a plugin name to prefix to all the option names that follow. The previous example is equivalent to this:
[drizzle-protocol]
port=4427
[mysql-protocol]
port=3306
Once a header is declared, it remains in affect until another header is declared, and the plugin name is prefixed to every option that follows, so you cannot override the header plugin name by specifying a different plugin name like this:
[drizzle-protocol]
port=4427
mysql-protocol.port=3306 # WRONG
That config file is wrong and it will cause an error when Drizzle starts like “unknown option drizzle-protocol.mysql-protocol.port”.
Since the Options are not part of a plugin, they cannot be specified after any header. Therefore, you should specify all Options at the start of the config file, or in a separate config file by using Multiple Config Files.
Command Line Options¶
Command line options have the form --option-name=value (the = is optional). This form works for both Options and all plugin options. For example:
drizzled --basedir=/opt/drizzle --innodb.buffer-pool-size=500MMultiple Config Files¶
The command line option --defaults-file specifies one config file, but --config-dir specifies a directory which can contain multiple config files. If a file named drizzled.cnf exists in the config dir, it is read first. If the config dir contains a directory called conf.d, then every file in that directory is read as a config file. (Even hidden files are read, including hidden temp files created by your editor while editing config files in this directory.)
A good strategy for configuring Drizzle with multiple config files is to put general Options in /etc/drizzle/drizzled.cnf (/etc/drizzle is the default --config-dir value) and any options related to a plugin in a separate config file in /etc/drizzle/conf.d/. For example:
$ ls /etc/drizzle/*
/etc/drizzle/drizzled.cnf
/etc/drizzle/conf.d:
auth-file
$ cat /etc/drizzle/drizzled.cnf
server-id=42
core-file$ cat /etc/drizzle/conf.d/auth-file
# drizzled option to load the auth_file plugin
plugin-remove=auth_all
plugin-add=auth_file
# Options for the plugin itself
[auth-file]
users=/etc/drizzle/users