# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/share/mysql/ # # this is only for the mysqld standalone daemon [mysqld] binlog_cache_size = 192K thread_stack = 384K join_buffer_size = 4096K query_cache_type = 1 max_heap_table_size = 1024M default_storage_engine = InnoDB performance_schema_max_table_instances = 400 table_definition_cache = 400 skip-external-locking key_buffer_size = 512M max_allowed_packet = 1G table_open_cache = 1024 sort_buffer_size = 2048K net_buffer_length = 4K read_buffer_size = 2048K read_rnd_buffer_size = 1024K myisam_sort_buffer_size = 16M thread_cache_size = 192 query_cache_size = 256M tmp_table_size = 1024M sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES max_connections = 30000 max_connect_errors = 1000 open_files_limit = 65535 expire_logs_days = 10 #log_queries_not_using_indexes=on character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_general_ci init_connect='SET NAMES utf8mb4' #character-set-server=utf8 skip_name_resolve event_scheduler=1 #skip-grant-tables #innodb_data_home_dir = /var/lib/mysql/ #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /var/lib/mysql/ #innodb_buffer_pool_size = 1024M #innodb_log_file_size = 128M #innodb_log_buffer_size = 32M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 #innodb_max_dirty_pages_pct = 90 #innodb_read_io_threads = 4 #innodb_write_io_threads = 4 # # Allow server to accept connections on all interfaces. # #bind-address=0.0.0.0 # # this is only for embedded server # This group is only read by MariaDB servers, not by MySQL. # If you use the same .cnf file for MySQL and MariaDB, # you can put MariaDB-only options here [mariadb] #autoset_open_files_limit #enable_slow_query_log #audit plugin_load_add=server_audit server_audit_logging=on server_audit_events=connect,query server_audit=force_plus_permanent server_audit_events=QUERY_DDL,QUERY_DML,CONNECT server_audit_output_type=file server_audit_file_rotate_now=on server_audit_file_rotations=9 server_audit_file_rotate_size=1G server_audit_file_path=/data/logs/mariadb log_error=/data/logs/mariadb/mariadb.err.log log_output=FILE slow_query_log long_query_time=3 slow_query_log_file=/data/logs/mariadb/mariadb-slow.log log_queries_not_using_indexes=ON #Logging Queries That Don't Use Indexes #server_id=2 log-bin=/data/logs/mariadb/mysql-bin # This group is only read by MariaDB-10.5 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand