How to tune mysql?

Hi. I don't see any way to tune or modify MySQL values in the documentation. I saw this: https://docs.directadmin.com/other-hosting-services/mariadb-mysql/general.html#where-is-my-cnf , but of course, with each update, this would be overwritten. How can I do this in Debian 12?
I use Ubuntu 24.04 (So effectively Debian), and the small changes I make, live in the /etc/mysql/my.cnf file Updates, to date, haven't touched or overwritten that file yet.

I didn't need to make any changes to the my.cnf and mysql.conf files in /usr/local/directadmin/conf so don't know if they get overwritten with custombuild. My hunch is they might as anything in the directadmin folder is fair game for custombuild 🤣

If you want permanent changes, the proper way to do it to avoid overwrites would be to add a cnf file to the conf.d folder as they get read in chronological order i believe
Code:
# cd /etc/mysql/conf.d
# nano 99-FILENAME.cnf

[mysqld]
........
# systemctl restart mysqld

I only put a few lines in the /etc/my.cnf for speed and because I don't really know why! 🤣
 
Last edited:
Back
Top