
The short answer: MariaDB already comes with reasonable values. Tuning only pays when you have measured that the database is the bottleneck. Then nearly all the gain comes from one setting (the memory the database uses to keep data), and the rest is not breaking things. Change one thing at a time and measure.
The settings that matter
| Setting | What it does |
| innodb_buffer_pool_size | The memory where InnoDB keeps the data and indexes it has read. This is the one that weighs most. Bigger helps, but it must fit in RAM alongside PHP and the web server, or the server runs out of memory. |
| max_connections | How many connections at once. Raise it only if you see “Too many connections”; each connection costs memory. |
| slow_query_log and long_query_time | They record slow queries. They speed nothing up; they show where the problem is: Slow queries. |
| Per-connection buffers | Leave them at the default. Large values multiply by every connection and blow the memory. |
| The query cache | Do not switch it on for a site that writes a lot: it usually makes things worse. |
Step by step
|
|
|
|
|
| If MariaDB does not start after the change, it was almost always a value that does not fit or a typo in the file. Take your file out, start it, and read the error: Reading systemctl status. And do not change five things at once: you will not know which one helped. |
| “MySQL server has gone away” often points to something else (a big packet, a timeout), not a lack of tuning: The causes, in order. If the server runs out of memory, see Out of memory on a VPS. |
|
Want an opinion on your server’s numbers? Open a ticket with the VPS plan and what you measured. Open a support ticket |
RECOMMENDED PRODUCT VPS server with root access Resources of your own, the OS you choose, reinstall whenever you like. from 456,30 MT/mo (3-year plan, with coupon) See plans |











