Skip to Main Content
MySQL in a Nutshell, 2nd Edition
book

MySQL in a Nutshell, 2nd Edition

by Russell J. T. Dyer
April 2008
Intermediate to advanced content levelIntermediate to advanced
566 pages
21h 55m
English
O'Reilly Media, Inc.
Content preview from MySQL in a Nutshell, 2nd Edition

Name

mysqld

Synopsis

mysqld [options]

When mysqld starts, various options can be used to alter the server’s behavior. Although you don’t need to know all of the server options available or use them—quite often the default settings are fine—as a database administrator, it’s useful to know what options exist for various categories that may be related to your needs.

Options may be given at the command line when starting or restarting the server. However, it’s common practice to enter them into a configuration file. On Unix-based systems, the main configuration file typically is /etc/my.cnf. For Windows systems, the main file is usually either c:\systems\my.ini or c:\my.conf. Options are entered on separate lines and follow a variable=value format. Some options are binary and can be enabled by just including the option at the command line when starting the server or in the options file with no value (or an equals sign followed by no value).

Within the options file, options are grouped under headings contained within square brackets. The mysqld daemon reads options from the configuration file under the headings of [mysqld] and [server] as it’s started. For more recent versions of the MySQL server, the group [mysqld-5.0] is also read. Groups are read in the order mentioned here, and the last setting for an option read is the one used. To get a list of options that mysqld is using on a particular server, enter the following line from the command line (results follow):

$ mysqld --print-defaults ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MySQL in a Nutshell

MySQL in a Nutshell

Russell J. T. Dyer
MySQL Reference Manual

MySQL Reference Manual

Michael Widenius, David Axmark, Kaj Arno
MySQL Cookbook

MySQL Cookbook

Paul DuBois

Publisher Resources

ISBN: 9780596514334Errata Page