Configuration and tuning

Download mysql eBook

Remarks

Configuration happens in one of 3 ways:

  • command line options
  • the my.cnf configuration file
  • setting variables from within the server

Command Line options takes the form mysqld --long-parameter-name=value --another-parameter. The same parameters can be placed in the my.conf configuration file. Some parameters are configurable using system variables from within MySQL. Check the official documentation for a complete list of parameters.

Variables can have dash - or underscore _. Spaces may exist around the =. Large numbers can be suffixed by K, M, G for kilo-, mega-, and giga-. One setting per line.

Flags: Usually ON and 1 are synonymous, ditto for OFF and 0. Some flags have nothing after them.

When placing the settings in my.cnf, all settings for the server must be in the [mysqld] section, so don't blindly add settings to the end of the file. (Note: For tools that allow multiple mysql instances to share one my.cnf, the section names may be different.)

Related Examples

Stats

319 Contributors: 6
Thursday, January 19, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook