Documentation: Configuration files

This commit is contained in:
cytopia 2018-04-04 08:55:55 +02:00
parent 6424e6e426
commit 618e485460
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
2 changed files with 102 additions and 3 deletions

View File

@ -0,0 +1,98 @@
.. _my_cnf:
******
my.cnf
******
``my.ini`` changes are global to all projects, but will only affect the currently selected
MySQL version.
**Table of Contents**
.. contents:: :local:
General
=======
You can set custom MySQL options via your own defined ``my.cnf`` files for each version separately.
This is achieved by placing a file into ``cfg/mysql-X.X/``, ``cfg/mariadb-X.X/`` or
``cfg/percona-X-X`` (where ``X.X`` stands for your MySQL version).
The file must end by ``.cnf`` in order to be sourced by the MySQL server.
Each of the MySQL cnf configuration directories already contain an example file:
``devilbox-custom.cnf-example``, that can simply be renamed to ``devilbox-custom.cnf``.
This file holds same example values that can be adjusted or commented out.
In order for the changes to be applied, you will have to restart the Devilbox.
Examples
========
Change key_buffer_size for MySQL 5.5
------------------------------------
The following examples shows you how to change the
`key_buffer_size <https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_key_buffer_size>`_
of MySQL 5.5 to 16 MB.
.. code-block:: bash
# Navigate to the Devilbox directory
host> cd path/to/devilbox
# Navigate to MySQL 5.5 config directory
host> cd cfg/mysql-5.5
# Create new cnf file
host> touch key_buffer_size.cnf
Now add the following content to the file:
.. code-block:: ini
:name: memory_limit.cnf
:caption: memory_limit.cnf
[mysqld]
key_buffer_size=16M
In order to apply the changes you need to restart the Devilbox.
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.
Change timeout and packet size for PerconaDB 5.7
------------------------------------------------
The following examples shows you how to change the
`wait_timeout <https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout>`_
and
`max_allowed_packet <https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet>`_
of PerconaDB 5.7
.. code-block:: bash
# Navigate to the Devilbox directory
host> cd path/to/devilbox
# Navigate to PerconaDB 5.7 config directory
host> cd cfg/percona-5.7
# Create new ini file
host> touch timeouts.cnf
Now add the following content to the file:
.. code-block:: ini
:name: timeouts.cnf
:caption: timeouts.cnf
[mysqld]
max_allowed_packet=256M
wait_timeout = 86400
In order to apply the changes you need to restart the Devilbox.
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.

View File

@ -5,7 +5,8 @@ php.ini
*******
PHP.ini changes are a global option and will affect all projects simultaneously.
``php.ini`` changes are global to all projects, but will only affect the currently selected
PHP version.
**Table of Contents**
@ -44,7 +45,7 @@ The following examples shows you how to change the
host> cd path/to/devilbox
# Navigate to PHP 7.1 config directory
host> cd cfg/php-fpm/7.1
host> cd cfg/php-fpm-7.1
# Create new ini file
host> touch memory_limit.ini
@ -76,7 +77,7 @@ of PHP 5.6.
host> cd path/to/devilbox
# Navigate to PHP 5.6 config directory
host> cd cfg/php-fpm/5.6
host> cd cfg/php-fpm-5.6
# Create new ini file
host> touch timeouts.ini