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

yumでmysql(maria DB)を最新安定バージョンにアップデートする(Cent OS7)

More than 3 years have passed since last update.

mariadbが5.5.40と古いバージョンになっていたので、これを最新安定版の10.1.21にアップデートする方法のメモ

yumリポジトリの追加

MariaDBリポジトリ情報の生成

repository generatorを使って、指定のmaria DBバージョンのyumリポジトリ情報を生成し、追加する。

yumリポジトリのMariaDBリポジトリを追加

/etc/yum.repos.d/MariaDB.repoが無ければ新規作成

/etc/yum.repos.d/MariaDB.repo
# MariaDB 10.1 CentOS repository list - created 2017-02-07 07:13 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yumでMariaDBをインストール・アップデート

新規のインストールの場合

sudo yum install MariaDB-server MariaDB-client

アップデートの場合

# systemctl stop mariadb
# systemctl status mariadb
mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled)
   Active: inactive (dead)


# yum update MariaDB-server MariaDB-client
読み込んだプラグイン:fastestmirror, remove-with-leaves, show-leaves
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています

  〜 略 〜

# mysql --version
mysql  Ver 15.1 Distrib 10.1.21-MariaDB, for Linux (x86_64) using readline 5.1

# systemctl start mariadb

# mysql -u root -e 'status'
--------------
mysql  Ver 15.1 Distrib 10.1.21-MariaDB, for Linux (x86_64) using readline 5.1

Connection id:      2
Current database:
Current user:       root@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server:         MariaDB
Server version:     10.1.21-MariaDB MariaDB Server
Protocol version:   10
Connection:     Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:        /var/lib/mysql/mysql.sock
Uptime:         3 sec

Threads: 1  Questions: 4  Slow queries: 0  Opens: 16  Flush tables: 1  Open tables: 9  Queries per second avg: 1.333
--------------
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