To install latest MariaDB on CentOS server, go to
https://downloads.mariadb.org/mariadb/repositories/#mirror=Fibergrid
On this page, select CentOS, then select your CentOS version and MariaDB version you need.
Below you will see instruction for your specific version of CentOS.
Install MariaDB 10.5 on CentOS 7
CentOS 7 by default provide MariaDB 5.5. To install MariaDB 10.5
Create file
1 |
vi /etc/yum.repos.d/MariaDB.repo |
Add
1 2 3 4 5 6 7 |
# MariaDB 10.5 CentOS repository list - created 2020-11-05 08:27 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 |
Now you can install MariDB with command
1 |
yum install MariaDB-server MariaDB-client |
To start MariaDB, run
1 |
systemctl start mariadb |
You can replace start with stop/restart/status. To auto start MariaDB on boot, run
1 |
systemctl enable mariadb |
See MySQL