Help us understand the problem. What is going on with this article?

CentOS 6にMariaDB 10.2をインストール(SCL)

はじめに

Software Collection(SCL)を利用してCentOS6にMariaDB 10.2をインストール
親記事:MySQL, MariaDBの各種インストール方法とEOLまとめ - Qiita
参考:Quick Start — Software Collections

サポート

本手法で導入した場合、Red Hat Software Collections Product Life Cycle - Red Hat Customer Portalより、2020-10がEOLだと思われる。
それ以降に報告された脆弱性や不具合への対応は実施されない可能性がある。

LOG

レポジトリ登録

# yum install -y centos-release-scl

インストール

# cat /etc/redhat-release
CentOS release 6.10 (Final)

# yum install -y rh-mariadb102
# scl enable rh-mariadb102 bash
... 略

mysql起動/停止

初回起動時には初期設定関係のメッセージが表示される。

# service rh-mariadb102-mariadb start
Initializing MariaDB database


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

scl enable rh-mariadb102 -- '/opt/rh/rh-mariadb102/root/usr/libexec/mysqladmin' -u root password 'new-password'
scl enable rh-mariadb102 -- '/opt/rh/rh-mariadb102/root/usr/libexec/mysqladmin' -u root -h 480e4a04dbf1 password 'new-password'

Alternatively you can run:
scl enable rh-mariadb102 -- '/opt/rh/rh-mariadb102/root/usr/libexec/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

Starting rh-mariadb102-mariadb:                            [  OK  ]

# service rh-mariadb102-mariadb status
rh-mariadb102-mariadb (pid  486) is running...
# service rh-mariadb102-mariadb stop
Stopping rh-mariadb102-mariadb:                            [  OK  ]

# service rh-mariadb102-mariadb status
rh-mariadb102-mariadb is stopped

mysql自動起動設定/設定解除

# chkconfig rh-mariadb102-mariadb on
# chkconfig --list rh-mariadb102-mariadb
rh-mariadb102-mariadb   0:off   1:off   2:on    3:on    4:on    5:on    6:off
# chkconfig rh-mariadb102-mariadb off
# chkconfig --list rh-mariadb102-mariadb
rh-mariadb102-mariadb   0:off   1:off   2:off   3:off   4:off   5:off   6:off

各種確認

# service rh-mariadb102-mariadb start
Database MariaDB is probably initialized in /var/opt/rh/rh-mariadb102/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/opt/rh/rh-mariadb102/lib/mysql is empty before running mysql-prepare-db-dir.
Starting rh-mariadb102-mariadb:                            [  OK  ]

# mysql -u root -e'select version();'
+-----------------+
| version()       |
+-----------------+
| 10.2.22-MariaDB |
+-----------------+
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした