Skip to content

Instantly share code, notes, and snippets.

@imranrazakhan
Created January 22, 2020 15:17
Show Gist options
  • Save imranrazakhan/5ec96905048758eb49cf7ac6140bdfff to your computer and use it in GitHub Desktop.
Save imranrazakhan/5ec96905048758eb49cf7ac6140bdfff to your computer and use it in GitHub Desktop.
MySQL Conf
MYSQL Docker has multiple files for conf so i show all fles output
$ cat conf.d/docker.cnf
[mysqld]
skip-host-cache
skip-name-resolve
$ cat conf.d/mysql.cnf
[mysql]
$ cat conf.d/mysqldump.cnf
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
$ cat conf.d/ycube.cnf
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
init-connect='SET NAMES utf8'
character-set-server = utf8
lower_case_table_names = 1
skip-host-cache
skip-name-resolve
bind-address = 0.0.0.0
event_scheduler=on
innodb-flush-method=O_DIRECT
innodb_buffer_pool_size=4G
innodb_buffer_pool_instances=4
innodb_read_io_threads=8
innodb_write_io_threads=8
max_allowed_packet=32M
innodb_flush_log_at_trx_commit=0
tmp_table_size=32M
max_heap_table_size=32M
query_cache-type=0
query_cache_size=0
max_connections=500
thread_cache_size=50
open_files_limit=65535
table_definition_cache=1024
table_open_cache=2048
$ cat my.cnf
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
$ cat mysql.cnf
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
I have no name!@db-1-bc6vl:/etc/mysql$ cat mysql.conf.d/mysqld.cnf
conf.d/ my.cnf my.cnf.fallback mysql.cnf mysql.conf.d/
I have no name!@db-1-bc6vl:/etc/mysql$ cat mysql.conf.d/mysqld.cnf
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment