Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
This describes the installation of a MySQL-Server.
If you want to use this solution you need the following howto(s) finished:
emerge dev-db/mysql
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/logrotate.d/mysql
Changed on 09.09.08Optimazions
/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {After change
/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err /var/log/mysql/slow.log {
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/mysql/mysql.d/50-distro-server.cnf
Changed on 09.09.08MySQL should listen only on the socket
# skip-networking bind-address = 127.0.0.1After change
skip-networking #bind-address = 127.0.0.1
This deactivetes bin-logging, because we don't want to use a MySQL cluster. Backups are made with the Backup-Script. (see Backup topic)
log-bin server-id = 1After change
# log-bin # server-id = 1 skip-log-bin disable_log_bin
Optimazions
secure-file-priv=NULL default_authentication_plugin=mysql_native_password innodb_file_per_table=1 innodb_buffer_pool_size = 1024MiB innodb_log_file_size = 512MiB [server] skip_name_resolve = 1 innodb_buffer_pool_size = 128M innodb_buffer_pool_instances = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 32M innodb_max_dirty_pages_pct = 90 tmp_table_size= 64M max_heap_table_size= 64M slow_query_log = 1 slow_query_log_file = /var/log/mysql/slow.log long_query_time = 1
For starting the new service after system reboot you should add it to a runlevel with the following command(s):
rc-update add mysql
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.