長いこと放置していたので,mariadbをアップデートしました.
今回から公式バイナリに変更
以下,作業メモです.
公式レポジトリの設定を追加
# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash [warning] Found existing file at /etc/yum.repos.d/mariadb.repo. Moving to /etc/yum.repos.d/mariadb.repo.old_1. [info] Repository file successfully written to /etc/yum.repos.d/mariadb.repo. [info] Adding trusted package signing keys... [info] Succeessfully added trusted package signing keys.
サービス停止
(パッチあてならとめないけど,今回はなんとなくとめました.)
# systemctl stop mariadb
yum update
# yum update MariaDB-server MariaDB-client Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * remi: ftp.riken.jp * remi-php56: ftp.riken.jp * updates: ftp.iij.ad.jp Resolving Dependencies --> Running transaction check ---> Package MariaDB-client.x86_64 0:10.3.11-1.el7.centos will be obsoleting --> Processing Dependency: MariaDB-common for package: MariaDB-client-10.3.11-1.el7.centos.x86_64 ---> Package MariaDB-server.x86_64 0:10.3.11-1.el7.centos will be obsoleting --> Processing Dependency: galera for package: MariaDB-server-10.3.11-1.el7.centos.x86_64 --> Processing Dependency: lsof for package: MariaDB-server-10.3.11-1.el7.centos.x86_64 ---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be obsoleted ---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be obsoleted --> Running transaction check ---> Package MariaDB-common.x86_64 0:10.3.11-1.el7.centos will be installed --> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.3.11-1.el7.centos.x86_64 ---> Package galera.x86_64 0:25.3.24-1.rhel7.el7.centos will be installed --> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: galera-25.3.24-1.rhel7.el7.centos.x86_64 ---> Package lsof.x86_64 0:4.87-6.el7 will be installed --> Running transaction check ---> Package MariaDB-compat.x86_64 0:10.3.11-1.el7.centos will be obsoleting ---> Package boost-program-options.x86_64 0:1.53.0-27.el7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be obsoleted --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.60-1.el7_5 for package: 1:mariadb-devel-5.5.60-1.el7_5.x86_64 --> Running transaction check ---> Package MariaDB-devel.x86_64 0:10.3.11-1.el7.centos will be obsoleting ---> Package mariadb-devel.x86_64 1:5.5.60-1.el7_5 will be obsoleted --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: MariaDB-client x86_64 10.3.11-1.el7.centos mariadb-main 53 M replacing mariadb.x86_64 1:5.5.60-1.el7_5 MariaDB-compat x86_64 10.3.11-1.el7.centos mariadb-main 2.8 M replacing mariadb-libs.x86_64 1:5.5.60-1.el7_5 MariaDB-devel x86_64 10.3.11-1.el7.centos mariadb-main 7.0 M replacing mariadb-devel.x86_64 1:5.5.60-1.el7_5 MariaDB-server x86_64 10.3.11-1.el7.centos mariadb-main 123 M replacing mariadb-server.x86_64 1:5.5.60-1.el7_5 Installing for dependencies: MariaDB-common x86_64 10.3.11-1.el7.centos mariadb-main 157 k boost-program-options x86_64 1.53.0-27.el7 base 156 k galera x86_64 25.3.24-1.rhel7.el7.centos mariadb-main 8.1 M lsof x86_64 4.87-6.el7 base 331 k Transaction Summary ======================================================================================================================== Install 4 Packages (+4 Dependent packages) Total download size: 195 M Is this ok [y/d/N]: y Downloading packages: (1/8): MariaDB-10.3.11-centos73-x86_64-common.rpm | 157 kB 00:00:01 (2/8): MariaDB-10.3.11-centos73-x86_64-compat.rpm | 2.8 MB 00:00:02 (3/8): MariaDB-10.3.11-centos73-x86_64-devel.rpm | 7.0 MB 00:00:05 (4/8): boost-program-options-1.53.0-27.el7.x86_64.rpm | 156 kB 00:00:00 (5/8): MariaDB-10.3.11-centos73-x86_64-client.rpm | 53 MB 00:00:22 (6/8): lsof-4.87-6.el7.x86_64.rpm | 331 kB 00:00:00 (7/8): galera-25.3.24-1.rhel7.el7.centos.x86_64.rpm | 8.1 MB 00:00:04 (8/8): MariaDB-10.3.11-centos73-x86_64-server.rpm | 123 MB 00:00:38 ------------------------------------------------------------------------------------------------------------------------ Total 4.1 MB/s | 195 MB 00:00:47 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : MariaDB-compat-10.3.11-1.el7.centos.x86_64 1/12 Installing : MariaDB-common-10.3.11-1.el7.centos.x86_64 2/12 warning: /etc/my.cnf created as /etc/my.cnf.rpmnew Installing : MariaDB-client-10.3.11-1.el7.centos.x86_64 3/12 Installing : boost-program-options-1.53.0-27.el7.x86_64 4/12 Installing : galera-25.3.24-1.rhel7.el7.centos.x86_64 5/12 Installing : lsof-4.87-6.el7.x86_64 6/12 Installing : MariaDB-server-10.3.11-1.el7.centos.x86_64 7/12 Installing : MariaDB-devel-10.3.11-1.el7.centos.x86_64 8/12 Erasing : 1:mariadb-server-5.5.60-1.el7_5.x86_64 9/12 warning: /var/log/mariadb/mariadb.log saved as /var/log/mariadb/mariadb.log.rpmsave Erasing : 1:mariadb-devel-5.5.60-1.el7_5.x86_64 10/12 Erasing : 1:mariadb-5.5.60-1.el7_5.x86_64 11/12 Erasing : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 12/12 Verifying : MariaDB-common-10.3.11-1.el7.centos.x86_64 1/12 Verifying : MariaDB-client-10.3.11-1.el7.centos.x86_64 2/12 Verifying : galera-25.3.24-1.rhel7.el7.centos.x86_64 3/12 Verifying : lsof-4.87-6.el7.x86_64 4/12 Verifying : MariaDB-compat-10.3.11-1.el7.centos.x86_64 5/12 Verifying : MariaDB-server-10.3.11-1.el7.centos.x86_64 6/12 Verifying : boost-program-options-1.53.0-27.el7.x86_64 7/12 Verifying : MariaDB-devel-10.3.11-1.el7.centos.x86_64 8/12 Verifying : 1:mariadb-server-5.5.60-1.el7_5.x86_64 9/12 Verifying : 1:mariadb-5.5.60-1.el7_5.x86_64 10/12 Verifying : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 11/12 Verifying : 1:mariadb-devel-5.5.60-1.el7_5.x86_64 12/12 Installed: MariaDB-client.x86_64 0:10.3.11-1.el7.centos MariaDB-compat.x86_64 0:10.3.11-1.el7.centos MariaDB-devel.x86_64 0:10.3.11-1.el7.centos MariaDB-server.x86_64 0:10.3.11-1.el7.centos Dependency Installed: MariaDB-common.x86_64 0:10.3.11-1.el7.centos boost-program-options.x86_64 0:1.53.0-27.el7 galera.x86_64 0:25.3.24-1.rhel7.el7.centos lsof.x86_64 0:4.87-6.el7 Replaced: mariadb.x86_64 1:5.5.60-1.el7_5 mariadb-devel.x86_64 1:5.5.60-1.el7_5 mariadb-libs.x86_64 1:5.5.60-1.el7_5 mariadb-server.x86_64 1:5.5.60-1.el7_5 Complete!
サービス開始
# systemctl start mariadb
最新バージョンに適合させるようデータ変換
# mysql_upgrade -u root -p Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.columns_priv OK (中略) Phase 7/7: Running 'FLUSH PRIVILEGES' OK
ステータス確認
# mysql -u root -e 'status' -p Enter password: -------------- mysql Ver 15.1 Distrib 10.3.11-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 21 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MariaDB Server version: 10.3.11-MariaDB MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 47 sec Threads: 7 Questions: 489 Slow queries: 0 Opens: 274 Flush tables: 1 Open tables: 100 Queries per second avg: 10.404 --------------