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

CentOS7のMariaDB5.5を10.3にアップグレードする

More than 1 year has passed since last update.

※10.3 stable リリースされてるので更新してみた。

MySql5.6+からマイグレーションする場合など、MariaDB5.5では動作しないケースが多々ありそうなので10.1「10.3」にしてみました。

公式yumリポジトリ追加

公式のCentOS7x64のMariaDB10.3 Stableのリポジトリ情報
を追加します。

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

version5.5のサーバー停止

$ sudo systemctl stop mariadb

Update

$ sudo yum update mariadb-server -y
~~略~~

base                                                     | 3.6 kB     00:00     
epel                                                     | 3.2 kB     00:00     
extras                                                   | 3.4 kB     00:00     
mariadb-main                                             | 2.9 kB     00:00     
mariadb-maxscale                                         | 2.4 kB     00:00     
mariadb-tools                                            | 2.9 kB     00:00    
updates                                                  | 3.4 kB     00:00
(1/6): epel/x86_64/group_gz                                |  88 kB   00:00     
(2/6): epel/x86_64/updateinfo                              | 949 kB   00:00     
(3/6): mariadb-tools/7/x86_64/primary_db                   |  11 kB   00:02     
(4/6): mariadb-maxscale/7/x86_64/primary_db                | 6.4 kB   00:02     
(5/6): mariadb-main/7/x86_64/primary_db                    |  50 kB   00:02     

↑3つのmariadb関係リポジトリをロードしている


~~中略~~

(1/7): MariaDB-10.3.10-centos73-x86_64-common.rpm          | 157 kB   00:10     
(2/7): MariaDB-10.3.10-centos73-x86_64-compat.rpm          | 2.8 MB   00:07     
(3/7): boost-program-options-1.53.0-27.el7.x86_64.rpm      | 156 kB   00:00     
(4/7): MariaDB-10.3.10-centos73-x86_64-client.rpm          |  53 MB   00:42     
(5/7): lsof-4.87-5.el7.x86_64.rpm                          | 331 kB   00:00     
(6/7): galera-25.3.24-1.rhel7.el7.centos.x86_64.rpm        | 8.1 MB   00:06     
(7/7): MariaDB-10.3.10-centos73-x86_64-server.rpm          | 123 MB   01:02     
--------------------------------------------------------------------------------
合計                                               2.4 MB/s | 188 MB  01:20     

~~中略~~

置換:
  mariadb.x86_64 1:5.5.44-1.el7_1       mariadb-devel.x86_64 1:5.5.44-1.el7_1
  mariadb-libs.x86_64 1:5.5.44-1.el7_1  mariadb-server.x86_64 1:5.5.44-1.el7_1

完了しました!

起動

$ sudo systemctl start mariadb

※ 私の場合は、update時に正しくMariaDB5.5が停止していなかったせいなのか、サービス名称がmariadbではなく、mysqldでした。

$ ss -ltn | grep 3306
LISTEN     0      80                       :::3306                    :::*

port3306がlistenしています。

$ mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.10-MariaDB MariaDB Server

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

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

MariaDB [(none)]> 

バージョン10.3になっています。

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
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