Mysql configuration

From wikinotes

Documentation

system variables docs https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html

Locations

/usr/local/etc/my.cnf mysqld config
/usr/local/share/mysql/ utility scripts

Variables

Mysql system variables are used to configure the server.

Set variables in my.cnf

# /etc/my.cnf

some_variable_name = ON;

Set variables interactively (not allowed for all variables).

SHOW VARIABLES LIKE 'some_variable_name';
SET GLOBAL some_variable_name = ON;

Set variables in commandline parameters

mysqld --some-variable-name