• OS 정보 확인
[root@localhost ~]# cat /etc/*release*
CentOS release 6.10 (Final)
CentOS release 6.10 (Final)
CentOS release 6.10 (Final)
cpe:/o:centos:linux:6:GA
[root@localhost ~]# cat /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

해당값을 다 설정했으면 MariaDB를 yum install 합니다.

yum install MariaDB

(yum install MariaDB-server MariaDB-client) 처럼 실행할 수 있으나, MariaDB로 우선 실행시킵니다.

[root@localhost ~]# rpm -qa | grep MariaDB
MariaDB-compat-10.2.32-1.el6.x86_64
MariaDB-client-10.2.32-1.el6.x86_64
MariaDB-server-10.2.32-1.el6.x86_64
MariaDB-common-10.2.32-1.el6.x86_64

로 정상적으로 설치된 것이 있는지 확입합니다.

  • MariaDB 실행
[root@localhost ~]# /etc/init.d/mysql start
Starting MariaDB.200619 18:39:40 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
200619 18:39:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
 SUCCESS!

MariaDB를 실행시킵니다.

  • MariaDB root 패스워드 변경
/usr/bin/mysqladmin -u root password "123456"
  • 리스너 확인합니다.
[root@localhost ~]# netstat -anp | grep 3306  
tcp        0      0 :::3306                     :::*                        LISTEN      1529/mysqld  
  • MariaDB 접속 확인
[root@localhost ~]# mysql -uroot -p
Enter password:  
Welcome to the MariaDB monitor.  Commands end with ; or \g.  
Your MariaDB connection id is 5  
Server version: 10.1.22-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)]> quit  
Bye
  • MariaDB 재시작
    service mysql restart