Mysql configuration: Difference between revisions
From wikinotes
No edit summary |
|||
Line 3: | Line 3: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| | | system variables docs || https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html | ||
|- | |- | ||
|} | |} | ||
Line 14: | Line 14: | ||
| <code>/usr/local/etc/my.cnf</code> || mysqld config | | <code>/usr/local/etc/my.cnf</code> || mysqld config | ||
|- | |- | ||
| <code>/usr/local/share/mysql/</code> || utility scripts | | <code>/usr/local/share/mysql/</code> || utility scripts | ||
|- | |- | ||
|} | |} | ||
</blockquote><!-- Locations --> | </blockquote><!-- Locations --> | ||
= Variables = | |||
<blockquote> | |||
Mysql system variables are used to configure the server. | |||
Set variables in <code>my.cnf</code> | |||
<syntaxhighlight lang="ini"> | |||
# /etc/my.cnf | |||
some_variable_name = ON; | |||
</syntaxhighlight> | |||
Set variables interactively (not allowed for all variables). | |||
<syntaxhighlight lang="mysql"> | |||
SHOW VARIABLES LIKE 'some_variable_name'; | |||
SET GLOBAL some_variable_name = ON; | |||
</syntaxhighlight> | |||
Set variables in commandline parameters | |||
<syntaxhighlight lang="mysql"> | |||
mysqld --some-variable-name | |||
</syntaxhighlight> | |||
</blockquote><!-- Variables --> |
Latest revision as of 01:05, 9 September 2022
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