[mysqld] # v1.1.2 log-error=/var/log/mysql/mysqld.log innodb_flush_method=O_DSYNC # Replication config starting from 8.0.26 # A difference between 5.7 and 8.0 is that binary logging (to be used for replication) is on by default in MySQL 8.0 # https://dba.stackexchange.com/questions/216352/inserts-in-mysql-8-are-slower-than-inserts-in-mysql-5-7 # Reenable for replication skip-log-bin # Comment this line out if replication is used. #binlog-do-db = m2 #binlog-do-db = mor #binlog-do-db = mor_mnp #binlog-do-db = opensips #replicate-do-db = m2 #replicate-do-db = mor #replicate-do-db = mor_mnp #replicate-do-db = opensips #server-id = 10 #server-id = 20 #auto_increment_increment = 10 #auto_increment_offset = 1 #auto_increment_offset = 2 #binlog_format=MIXED #log-bin = /var/lib/mysql/mysql-bin.log #log-bin-index = /var/lib/mysql/master-log-bin.index #relay-log = /var/lib/mysql/slave-relay.log #relay-log-index = /var/lib/mysql/slave-relay-log.index #replica_skip_errors = 1061,1062,1213,1060,1032,1396 #replica_transaction_retries = 3600 #binlog_expire_logs_seconds = 259200 #max_connections = 300 # Default is 2, which is not safe in STATEMENT and MIXED replications # https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html#innodb-auto-increment-lock-modes #innodb_autoinc_lock_mode = 1 # Default is ON from Mysql 8.0, set ON only on Master2 for Master1->Master2->Slave replications log-replica-updates = OFF # Remove information table schema cashing to get consistent values about auto increment, partitions, etc # https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_information_schema_stats_expiry # https://www.percona.com/blog/inconsistent-table-information-in-mysql-8-0-information_schema/ information_schema_stats_expiry = 0 skip-name-resolve secure_file_priv= local-infile=1 innodb_file_per_table=1 # Query Cached removed in MySQL8: https://dev.mysql.com/blog-archive/mysql-8-0-retiring-support-for-the-query-cache/ #query_cache_limit=30M #query_cache_size=0 #query_cache_type=0 thread_stack=2M thread_cache_size=8 max_allowed_packet=999M key_buffer_size=62M table_open_cache=1024 join_buffer_size=128M max_heap_table_size=1024M innodb_thread_concurrency=0 innodb_adaptive_hash_index=OFF innodb_buffer_pool_size=2G #innodb_log_file_size=64M # deprecated innodb_redo_log_capacity=134217728 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock sql_mode = "NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" optimizer_switch = index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=off # Disabling symbolic-links is recommended to prevent assorted security risks #symbolic-links=0 # default currently, no need to specify # Settings user and group are ignored when systemd is used (fedora >= 15). # If you need to run mysqld under a different user or group, # customize your systemd unit file for mysqld according to the # instructions in http://fedoraproject.org/wiki/Systemd user=mysql # Semisynchronous Replication # http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html # uncomment next line on MASTER ;plugin-load=rpl_semi_sync_master=semisync_master.so # uncomment next line on SLAVE ;plugin-load=rpl_semi_sync_slave=semisync_slave.so # Others options for Semisynchronous Replication ;rpl_semi_sync_master_enabled=1 ;rpl_semi_sync_master_timeout=10 ;rpl_semi_sync_slave_enabled=1 # http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html ;performance_schema [mysqldump] column-statistics=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid # # include all files from the config directory # !includedir /etc/my.cnf.d