View file File name : my.cnf-org Content :[mysqld] skip-grant-tables disable-log-bin=1 default-authentication-plugin=mysql_native_password #performance-schema=0 sql-mode="" # Query logging slow-query-log = 1 slow-query-log-file = /var/log/mysql-slow.log long_query_time = 2 # Reduced from 5 to catch more slow queries log-queries-not-using-indexes = 1 # Memory Configuration innodb_buffer_pool_size = 24G # ~75% of 32GB for dedicated MySQL server innodb_buffer_pool_instances = 8 # For better concurrency innodb_log_file_size = 2G # Larger log files for better performance innodb_log_buffer_size = 64M join_buffer_size = 4M sort_buffer_size = 4M read_buffer_size = 2M read_rnd_buffer_size = 4M max_connections = 200 # Adjust based on your application needs thread_cache_size = 50 table_open_cache = 4000 tmp_table_size = 128M max_heap_table_size = 128M # File and connection settings datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock symbolic-links=0 log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid max_allowed_packet=256M open_files_limit=40000 innodb_file_per_table=1 mysqlx=0 # InnoDB settings innodb_flush_method = O_DIRECT innodb_flush_neighbors = 0 # Disabled for SSD storage innodb_io_capacity = 2000 # Adjust based on your storage (SSD recommended) innodb_io_capacity_max = 4000 innodb_read_io_threads = 8 innodb_write_io_threads = 8 innodb_thread_concurrency = 0 # Let InnoDB decide # Character sets collation-server = utf8_unicode_ci character-set-server = utf8 default_authentication_plugin = mysql_native_password [client] default-character-set=utf8 [mysql] default-character-set=utf8