Skip to main content


Install on CentOS 7



# MariaDB 10.5 CentOS repository list - created 2021-05-08 02:51 UTC
name = MariaDB
baseurl =


yum install MariaDB-server MariaDB-client
Starting MariaDB
systemctl start mariadb.service
systemctl enable mariadb.service
systemctl status mariadb.service
Securing MariaDB
OS Optimization

Linux Kernel Settings – IO Scheduler

# A temporary change can be done by issuing the following command
echo noop > /sys/block/sda/queue/scheduler

# To make it persistent, you’ll need to configure it in GRUB’s configuration 
# file as shown below in /etc/default/grub , rebuild GRUB, and reboot the system.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"

Resource Limits – Open Files Limit, Core File Size

# /etc/security/limits.conf
mysql soft nofile 65535 
mysql hard nofile 65535
mysql soft core unlimited
mysql hard core unlimited

Configure Swappiness

# /etc/sysctl.conf
vm.swappiness = 1

Filesystem Optimizations

# /etc/fstab
/dev/sdb /var/lib/mysql ext4 defaults,noatime 0 0
DB Optimization