How to Optimize MariaDB / MySQL Configuration for 2GB & 4GB VPS (my.cnf Guide)
Quick Answer: To optimize MariaDB or MySQL for a 2GB or 4GB Linux VPS, edit /etc/mysql/my.cnf and allocate 65% to 70% of available RAM to the innodb_buffer_pool_size (1.4GB on a 2GB VPS, 2.8GB on a 4GB VPS), limit max_connections = 80, set innodb_log_file_size = 256M, and increase table_open_cache = 4000 to prevent disk I/O bottlenecks. … Read more
