Question

Mariadb my.cnf advice please - Centos8

Hi everyone

I have a $10 droplet running on NGINX and MariaDB 10.3 for my own Wordpress blog. I might in the future add 1 more blog to the server, but that will be the maximum.

Anyhow, I need to create a my.cnf file for my.cnf.d

When I used CentOS 7 I could just use the my.medium or large etc, but with 8 I need to create my own.

Does anyone have a my.cnf I can use that will be a good place to start for my server?

I want it to be set so my blog can cope with a decent amount of traffic.

I am going to run MySQL tuner once set up and left for a few days, but just need a file to get started

Thanks in advance

Colin

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

In addition to what has already been mentioned, I wanted to point out that CentOS Linux 8 has reached End Of Life (EOL) on December 31st, 2021.

I would strongly recommend planning either migration to another OS like Debian or Ubuntu, or upgrading to CentOS Stream.

I personally believe that the safest way to do this is to follow these steps here:

  • Spin up a new Droplet with the desired OS
  • Install the necessary services (webserver, sql server, etc.)
  • After that using rsync for example copy over your files and migrate your databases
  • Then test your website and server fully to make sure that everything is working as expected
  • Finally, change your DNS to point to the new Droplet

Regards, Alex

Hi @colinshaun77Eel,

The the optimization of MySQL is usually a trial and error kind of stuff however there are different tools that can help you out. Me personally, I’ll recommend checking out the ‘MySQL Tunner’ one. The MySQLTunerscript assesses your MySQL installation and then outputs suggestions for increasing your server’s performance and stability.

1.Download the MySQLTuner script:

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

Change the script’s permissions to be executable:

chmod +x mysqltuner.pl

Run the mysqltuner.pl script. You will be prompted to enter in your MySQL administrative login and password:

./mysqltuner.pl

The script will return results/suggestions which you can follow the optimize your MySQL.

Other than that, it’s not possible to suggest valid values as this depends on the traffic you get, on the queries you are executing and how often are they executed.

Regards, KDSys