[client]
default-character-set=utf8

#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d


[mysql]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=utf8

[mysqld]
performance-schema=0
innodb_use_native_aio = 0


bind_address = 127.0.0.1
datadir = /var/lib/mysql
pid_file = /var/lib/mysql/mysql.pid
socket = /var/lib/mysql/mysql.sock
port = 3306
unix_socket = off
tmpdir = /tmp

max_allowed_packet = 256M
max_connect_errors = 1000000

skip_external_locking

collation-server = utf8_unicode_ci
character-set-server = utf8

event_scheduler = off

sql_mode=""

# InnoDB
default_storage_engine = InnoDB
#innodb_buffer_pool_instances = 3 # Use 1 instance per 1GB of InnoDB pool size
#innodb_buffer_pool_size = 3G # Use up to 65% of RAM
innodb_buffer_pool_size=134217728
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_buffer_size = 16M
innodb_log_file_size = 1G
innodb_stats_on_metadata = 0

innodb_temp_data_file_path = ibtmp1:64M:autoextend:max:2G

innodb_read_io_threads = 64
innodb_write_io_threads = 64

key_buffer_size = 32M

low_priority_updates = 1
concurrent_insert = 2

max_connections = 300
max_user_connections = 20

back_log = 512
thread_cache_size = 100
thread_stack = 192K

interactive_timeout = 180
wait_timeout = 180

max_statement_time = 900

innodb_sort_buffer_size = 2M
join_buffer_size = 4M
read_buffer_size = 3M
read_rnd_buffer_size = 4M
sort_buffer_size = 4M

table_definition_cache = 40000
table_open_cache = 40000
open_files_limit=40000


max_heap_table_size = 128M
tmp_table_size = 128M

# Logging ##
disable-log-bin = 1
log_slow_query=1

# Log Files
log_error = /var/log/mysql_error.log
log_slow_query_file = /var/log/mysql_slow.log

# Adjust long_query_time as needed, most queries should take less than 0.5s
log_slow_query_time=5

# Enable temporarily during optimization review
log_queries_not_using_indexes = 0

plugin-load-add=auth_socket.so
[mysqldump]
quick
quote_names
max_allowed_packet = 512M
