ive added this in my my.cnf file and is really really skyrocking now. Chatgpt helped me lol
[mysqld]
skip-log-bin
ssl-ca=/etc/certs/mysql/ca.pem
#ssl-cert=/etc/mysql/ssl/cert.pem
#ssl-key=/etc/mysql/ssl/key.pem
skip-name-resolve
max_connections = 300
thread_cache_size = 100
table_open_cache = 10000
table_definition_cache = 10000
open_files_limit = 65535
CACHING (Query cache is deprecated in newer MySQL versions)
query_cache_type = 0
query_cache_size = 0
INNODB SETTINGS
innodb_buffer_pool_size = 48G # 75% of RAM
innodb_buffer_pool_instances = 12 # 1 instance per 4GB
innodb_log_file_size = 2G
innodb_log_buffer_size = 256M
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 2 # Safer = 1, Faster = 2
innodb_io_capacity = 2000
innodb_io_capacity_max = 4000
innodb_read_io_threads = 8
innodb_write_io_threads = 8
PERFORMANCE SCHEMA
performance_schema = OFF
TEMP TABLES
tmp_table_size = 512M
max_heap_table_size = 512M
LOGGING
slow_query_log = 1
slow_query_log_file = /var/log/mysql-slow.log
long_query_time = 2
log_error = /var/log/mysql-error.log
default_authentication_plugin = mysql_native_password
skip-host-cache