Установка MariaDB в CentOS

Установка MariaDB в CentOS

Roman Bogachev VMware Specialist | Drone Pilot | Traveler

MariaDB — форк от MySQL, с улучшенной производительностью и новыми возможностями.

Добавляем репозиторий.
В файл /etc/yum.repos.d/MariaDB.repo вписываем:

1
2
3
4
5
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Удаляем всё что связано с MySQL:

1
yum -y remove mysql* mysql-server mysql-devel mysql-libs

Устанавливаем MariaDB:

1
yum -y install MariaDB-client MariaDB-common MariaDB-compat MariaDB-devel MariaDB-server MariaDB-shared

Запускаем:

1
systemctl start mariadb.service

Добавляем в автозагрузку:

1
systemctl enable mariadb.service

Выполняем первоначальную настройку:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/usr/bin/mysql_secure_installation
...
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
...
Remove anonymous users? [Y/n] y
... Success!
...
Disallow root login remotely? [Y/n] y
... Success!
...
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
...
Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

И пробуем зайти в консоль:

1
2
3
4
5
6
7
8
9
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.1.13-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
On this page