MariaDB

Contents

MariaDBについて


公式ページ:https://mariadb.org/

用語



バイナリログ


バイナリログとはデータベースに対する変更を記録するログである。
このログは一般的に管理者が読むために使用するのではなく、レプリケーションやリストアのために使用される。
MariaDBでは標準ではバイナリログは記録されないので、出力するためには設定変更が必要。

参考:https://mariadb.com/kb/en/library/overview-of-the-binary-log/
参考:https://mariadb.com/kb/ja/overview-of-mariadb-logs/#overview-of-the-binary-log%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%E3%83%AD%E3%82%B0

機能



サーバー構築

 

構築環境

 

 

 

OS設定

 

ネットワーク

 

固定IPアドレス割り当て


次のファイルを編集する

# ifcfg-loはループバックインタフェースであるため、触らない
vi /etc/sysconfig/network-scripts/ifcfg-<インタフェース名>


以下では例として192.168.0.51/24を割り当てた

BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.51
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1


ネットワークを再起動する

systemctl restart network


ip addressコマンドにより、インタフェースが有効になっていることを確認する
これによりホストマシンなどからSSHでログイン可能となる


firewalld


MariaDBでも使用するMySQL(TCP/3306)用ポートを開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。

yum update firewalld -y

 

IP制限なし

 

  1. サービスが定義されていることを確認
    firewall-cmd --permanent --info-service=mysql
  2. 現在サービスが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep mysql
  3. サービスを適用する
    firewall-cmd --add-service=mysql --zone=public --permanent
  4. サービスが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep mysql
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

 

IP制限あり


接続元のIPアドレスを制限する場合、下記を行う。
ローカルホストからは許可せずとも接続可能である。

  1. サービスが定義されていることを確認
    firewall-cmd --permanent --info-service=mysql
  2. 現在サービスが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep mysql
  3. 現在リッチルールが適用されていないことを確認する
    firewall-cmd --permanent --zone=public --list-rich-rules | grep mysql
  4. ルールを適用する
    firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="<IPアドレス>" service name="mysql" accept"
  5. リッチルールが適用されていることを確認する
    firewall-cmd --permanent --zone=public --list-rich-rules | grep mysql
  6. 設定を再読み込みして反映させる
    firewall-cmd --reload

 

ホスト名


ホスト名としてmariadbを設定する

hostname mariadb.corp
# 再起動しても有効にする
echo mariadb.corp > /etc/hostname

再ログインすることで有効になる。

ユーザ作成


mariadb用のユーザを作成する

デーモン用ユーザ

 

useradd --user-group --no-create-home --shell `which false` mariadb

 

mariadb-libsのアンインストール


CentOS7では標準でmariadb-libsがインストールされている。
こちらはpostfixが依存している。
postfixでデータをMariaDBに格納する際に使用するライブラリであるが、
標準ではMariaDB本体はインストールされないため、使用されない。

残しておいても競合することはないが、MariaDB関連ファイルを検索するときなどにひっかっかってしまい邪魔であるので、気になるなら消してしまうとよい。
ただし、postfixごと消してしまうと、不都合があるので、依存関係を無視してアンインストールする必要がある。

rpm -ev --nodeps `rpm -qa | grep mariadb`
rm -f /etc/my.cnf


消さない場合でも、設定ファイルだけは削除しなければ、このファイルを読み込んでしまい、正常に起動しない場合がある。

rm -f /etc/my.cnf

 

MariaDBの構築



MariaDBのインストール

 

パッケージからインストール

 

 

yum install mariadb-server mariadb

[root@mariadb ~]# yum install mariadb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.56-2.el7 will be installed
--> Processing Dependency: perl(Sys::Hostname) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: perl(IPC::Open3) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: perl(Fcntl) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: perl(Exporter) for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Processing Dependency: /usr/bin/perl for package: 1:mariadb-5.5.56-2.el7.x86_64
--> Running transaction check
---> Package perl.x86_64 4:5.16.3-292.el7 will be installed
--> Processing Dependency: perl-libs = 4:5.16.3-292.el7 for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-292.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-292.el7.x86_64
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Running transaction check
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-4.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-libs.x86_64 4:5.16.3-292.el7 will be installed
---> Package perl-macros.x86_64 4:5.16.3-292.el7 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-292.el7 will be installed
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch        Version                Repository
                                                                           Size
================================================================================
Installing:
 mariadb                     x86_64      1:5.5.56-2.el7         base      8.7 M
Installing for dependencies:
 perl                        x86_64      4:5.16.3-292.el7       base      8.0 M
 perl-Carp                   noarch      1.26-244.el7           base       19 k
 perl-Encode                 x86_64      2.51-7.el7             base      1.5 M
 perl-Exporter               noarch      5.68-3.el7             base       28 k
 perl-File-Path              noarch      2.09-2.el7             base       26 k
 perl-File-Temp              noarch      0.23.01-3.el7          base       56 k
 perl-Filter                 x86_64      1.49-3.el7             base       76 k
 perl-Getopt-Long            noarch      2.40-3.el7             base       56 k
 perl-HTTP-Tiny              noarch      0.033-3.el7            base       38 k
 perl-PathTools              x86_64      3.40-5.el7             base       82 k
 perl-Pod-Escapes            noarch      1:1.04-292.el7         base       51 k
 perl-Pod-Perldoc            noarch      3.20-4.el7             base       87 k
 perl-Pod-Simple             noarch      1:3.28-4.el7           base      216 k
 perl-Pod-Usage              noarch      1.63-3.el7             base       27 k
 perl-Scalar-List-Utils      x86_64      1.27-248.el7           base       36 k
 perl-Socket                 x86_64      2.010-4.el7            base       49 k
 perl-Storable               x86_64      2.45-3.el7             base       77 k
 perl-Text-ParseWords        noarch      3.29-4.el7             base       14 k
 perl-Time-HiRes             x86_64      4:1.9725-3.el7         base       45 k
 perl-Time-Local             noarch      1.2300-2.el7           base       24 k
 perl-constant               noarch      1.27-2.el7             base       19 k
 perl-libs                   x86_64      4:5.16.3-292.el7       base      688 k
 perl-macros                 x86_64      4:5.16.3-292.el7       base       43 k
 perl-parent                 noarch      1:0.225-244.el7        base       12 k
 perl-podlators              noarch      2.5.1-3.el7            base      112 k
 perl-threads                x86_64      1.87-4.el7             base       49 k
 perl-threads-shared         x86_64      1.43-6.el7             base       39 k

Transaction Summary
================================================================================
Install  1 Package (+27 Dependent packages)

Total download size: 20 M
Installed size: 85 M
Is this ok [y/d/N]: y
Downloading packages:
(1/28): mariadb-5.5.56-2.el7.x86_64.rpm                    | 8.7 MB   00:01
(2/28): perl-Carp-1.26-244.el7.noarch.rpm                  |  19 kB   00:00
(3/28): perl-Encode-2.51-7.el7.x86_64.rpm                  | 1.5 MB   00:00
(4/28): perl-Exporter-5.68-3.el7.noarch.rpm                |  28 kB   00:00
(5/28): perl-File-Path-2.09-2.el7.noarch.rpm               |  26 kB   00:00
(6/28): perl-5.16.3-292.el7.x86_64.rpm                     | 8.0 MB   00:01
(7/28): perl-File-Temp-0.23.01-3.el7.noarch.rpm            |  56 kB   00:00
(8/28): perl-Filter-1.49-3.el7.x86_64.rpm                  |  76 kB   00:00
(9/28): perl-Getopt-Long-2.40-3.el7.noarch.rpm             |  56 kB   00:00
(10/28): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm             |  38 kB   00:00
(11/28): perl-PathTools-3.40-5.el7.x86_64.rpm              |  82 kB   00:00
(12/28): perl-Pod-Escapes-1.04-292.el7.noarch.rpm          |  51 kB   00:00
(13/28): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm            |  87 kB   00:00
(14/28): perl-Pod-Simple-3.28-4.el7.noarch.rpm             | 216 kB   00:00
(15/28): perl-Pod-Usage-1.63-3.el7.noarch.rpm              |  27 kB   00:00
(16/28): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm    |  36 kB   00:00
(17/28): perl-Socket-2.010-4.el7.x86_64.rpm                |  49 kB   00:00
(18/28): perl-Storable-2.45-3.el7.x86_64.rpm               |  77 kB   00:00
(19/28): perl-Text-ParseWords-3.29-4.el7.noarch.rpm        |  14 kB   00:00
(20/28): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm           |  45 kB   00:00
(21/28): perl-Time-Local-1.2300-2.el7.noarch.rpm           |  24 kB   00:00
(22/28): perl-constant-1.27-2.el7.noarch.rpm               |  19 kB   00:00
(23/28): perl-macros-5.16.3-292.el7.x86_64.rpm             |  43 kB   00:00
(24/28): perl-libs-5.16.3-292.el7.x86_64.rpm               | 688 kB   00:00
(25/28): perl-parent-0.225-244.el7.noarch.rpm              |  12 kB   00:00
(26/28): perl-podlators-2.5.1-3.el7.noarch.rpm             | 112 kB   00:00
(27/28): perl-threads-1.87-4.el7.x86_64.rpm                |  49 kB   00:00
(28/28): perl-threads-shared-1.43-6.el7.x86_64.rpm         |  39 kB   00:00
--------------------------------------------------------------------------------
Total                                              9.3 MB/s |  20 MB  00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:perl-parent-0.225-244.el7.noarch                          1/28
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                           2/28
  Installing : perl-podlators-2.5.1-3.el7.noarch                           3/28
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                          4/28
  Installing : 1:perl-Pod-Escapes-1.04-292.el7.noarch                      5/28
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                      6/28
  Installing : perl-Encode-2.51-7.el7.x86_64                               7/28
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                            8/28
  Installing : 4:perl-macros-5.16.3-292.el7.x86_64                         9/28
  Installing : 4:perl-libs-5.16.3-292.el7.x86_64                          10/28
  Installing : perl-Storable-2.45-3.el7.x86_64                            11/28
  Installing : perl-Exporter-5.68-3.el7.noarch                            12/28
  Installing : perl-constant-1.27-2.el7.noarch                            13/28
  Installing : perl-Time-Local-1.2300-2.el7.noarch                        14/28
  Installing : perl-Socket-2.010-4.el7.x86_64                             15/28
  Installing : perl-Carp-1.26-244.el7.noarch                              16/28
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      17/28
  Installing : perl-PathTools-3.40-5.el7.x86_64                           18/28
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 19/28
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                        20/28
  Installing : perl-File-Path-2.09-2.el7.noarch                           21/28
  Installing : perl-threads-shared-1.43-6.el7.x86_64                      22/28
  Installing : perl-threads-1.87-4.el7.x86_64                             23/28
  Installing : perl-Filter-1.49-3.el7.x86_64                              24/28
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                        25/28
  Installing : perl-Getopt-Long-2.40-3.el7.noarch                         26/28
  Installing : 4:perl-5.16.3-292.el7.x86_64                               27/28
  Installing : 1:mariadb-5.5.56-2.el7.x86_64                              28/28
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                           1/28
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                       2/28
  Verifying  : perl-Storable-2.45-3.el7.x86_64                             3/28
  Verifying  : perl-Exporter-5.68-3.el7.noarch                             4/28
  Verifying  : perl-constant-1.27-2.el7.noarch                             5/28
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                            6/28
  Verifying  : 4:perl-macros-5.16.3-292.el7.x86_64                         7/28
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                          8/28
  Verifying  : 4:perl-5.16.3-292.el7.x86_64                                9/28
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                        10/28
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                        11/28
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                        12/28
  Verifying  : 4:perl-libs-5.16.3-292.el7.x86_64                          13/28
  Verifying  : perl-Socket-2.010-4.el7.x86_64                             14/28
  Verifying  : perl-Carp-1.26-244.el7.noarch                              15/28
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      16/28
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 17/28
  Verifying  : 1:perl-Pod-Escapes-1.04-292.el7.noarch                     18/28
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                           19/28
  Verifying  : perl-Encode-2.51-7.el7.x86_64                              20/28
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                         21/28
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                          22/28
  Verifying  : perl-File-Path-2.09-2.el7.noarch                           23/28
  Verifying  : perl-threads-1.87-4.el7.x86_64                             24/28
  Verifying  : perl-Filter-1.49-3.el7.x86_64                              25/28
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                         26/28
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                     27/28
  Verifying  : 1:mariadb-5.5.56-2.el7.x86_64                              28/28

Installed:
  mariadb.x86_64 1:5.5.56-2.el7

Dependency Installed:
  perl.x86_64 4:5.16.3-292.el7
  perl-Carp.noarch 0:1.26-244.el7
  perl-Encode.x86_64 0:2.51-7.el7
  perl-Exporter.noarch 0:5.68-3.el7
  perl-File-Path.noarch 0:2.09-2.el7
  perl-File-Temp.noarch 0:0.23.01-3.el7
  perl-Filter.x86_64 0:1.49-3.el7
  perl-Getopt-Long.noarch 0:2.40-3.el7
  perl-HTTP-Tiny.noarch 0:0.033-3.el7
  perl-PathTools.x86_64 0:3.40-5.el7
  perl-Pod-Escapes.noarch 1:1.04-292.el7
  perl-Pod-Perldoc.noarch 0:3.20-4.el7
  perl-Pod-Simple.noarch 1:3.28-4.el7
  perl-Pod-Usage.noarch 0:1.63-3.el7
  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
  perl-Socket.x86_64 0:2.010-4.el7
  perl-Storable.x86_64 0:2.45-3.el7
  perl-Text-ParseWords.noarch 0:3.29-4.el7
  perl-Time-HiRes.x86_64 4:1.9725-3.el7
  perl-Time-Local.noarch 0:1.2300-2.el7
  perl-constant.noarch 0:1.27-2.el7
  perl-libs.x86_64 4:5.16.3-292.el7
  perl-macros.x86_64 4:5.16.3-292.el7
  perl-parent.noarch 1:0.225-244.el7
  perl-podlators.noarch 0:2.5.1-3.el7
  perl-threads.x86_64 0:1.87-4.el7
  perl-threads-shared.x86_64 0:1.43-6.el7

Complete!



ソースコードからインストール

 

 

  1. rootになる
    su -
  2. 関連パッケージをインストールする
    参考:https://mariadb.com/kb/en/library/Build_Environment_Setup_for_Linux/
    • まとめてインストールする場合
      yum install cmake ncurses-devel gnutls-devel gcc bison gcc-c++ perl -y
    • 個別にインストールする場合
      yum install cmake -y
      yum install ncurses-devel -y
      yum install gnutls-devel -y
      yum install gcc -y
      yum install bison -y
      yum install gcc-c++ -y
      # PerlはなくてもMariDBサーバ自体は動作するが、各ツールでPerlが用いられていることがある。
      yum install perl -y
  3. ソースコードを取得する
    1. ダウンロードサイト:https://downloads.mariadb.org/からアーカイブのURLを取得する
    2. ダウンロードする
      curl -O -s http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb//mariadb-10.3.7/source/mariadb-10.3.7.tar.gz
    3. アーカイブファイルを展開する
      tar xzfv mariadb-*.tar.gz
    4. ソースコードディレクトリへ移動する
      cd mariadb-*
  4. コンパイル、インストールを行う
    ビルド時のオプションは一度cmakeを行った後に確認できる。
    一部は次のコマンドでも確認できる。
    cmake -L
    • 使用可能なオプション

      [root@localhost mariadb-10.3.7]# cat CMakeCache.txt
      # This is the CMakeCache file.
      # For build in directory: /root/mariadb-10.3.7
      # It was generated by CMake: /usr/bin/cmake
      # You can edit this file to change values found and used by cmake.
      # If you do not want to change any of the values, simply exit the editor.
      # If you do want to change a value, simply edit, save, and exit the editor.
      # The syntax for the file is as follows:
      # KEY:TYPE=VALUE
      # KEY is the name of a variable in the cache.
      # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
      # VALUE is the current value for the KEY.
      
      ########################
      # EXTERNAL cache entries
      ########################
      
      //Path to a program.
      CMAKE_AR:FILEPATH=/usr/bin/ar
      
      //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
      // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel
      CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
      
      //Enable/Disable color output during build.
      CMAKE_COLOR_MAKEFILE:BOOL=ON
      
      //CXX compiler.
      CMAKE_CXX_COMPILER:FILEPATH=CMAKE_CXX_COMPILER-NOTFOUND
      
      //Flags used by the compiler during all build types.
      CMAKE_CXX_FLAGS:STRING=
      
      //Flags used by the compiler during debug builds.
      CMAKE_CXX_FLAGS_DEBUG:STRING=
      
      //Flags used by the compiler during release minsize builds.
      CMAKE_CXX_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the compiler during release builds (/MD /Ob1 /Oi
      // /Ot /Oy /Gs will produce slightly less optimized but smaller
      // files).
      CMAKE_CXX_FLAGS_RELEASE:STRING=
      
      //Flags used by the compiler during Release with Debug Info builds.
      CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=
      
      //C compiler.
      CMAKE_C_COMPILER:FILEPATH=CMAKE_C_COMPILER-NOTFOUND
      
      //Flags used by the compiler during all build types.
      CMAKE_C_FLAGS:STRING=
      
      //Flags used by the compiler during debug builds.
      CMAKE_C_FLAGS_DEBUG:STRING=
      
      //Flags used by the compiler during release minsize builds.
      CMAKE_C_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the compiler during release builds (/MD /Ob1 /Oi
      // /Ot /Oy /Gs will produce slightly less optimized but smaller
      // files).
      CMAKE_C_FLAGS_RELEASE:STRING=
      
      //Flags used by the compiler during Release with Debug Info builds.
      CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=
      
      //Flags used by the linker.
      CMAKE_EXE_LINKER_FLAGS:STRING=' '
      
      //Flags used by the linker during debug builds.
      CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
      
      //Flags used by the linker during release minsize builds.
      CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the linker during release builds.
      CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
      
      //Flags used by the linker during Release with Debug Info builds.
      CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
      
      //Enable/Disable output of compile commands during generation.
      CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
      
      //Install path prefix, prepended onto install directories.
      CMAKE_INSTALL_PREFIX:PATH=/usr/local/mariadb-10.3.7
      
      //Path to a program.
      CMAKE_LINKER:FILEPATH=/usr/bin/ld
      
      //Path to a program.
      CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
      
      //Flags used by the linker during the creation of modules.
      CMAKE_MODULE_LINKER_FLAGS:STRING=' '
      
      //Flags used by the linker during debug builds.
      CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
      
      //Flags used by the linker during release minsize builds.
      CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the linker during release builds.
      CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
      
      //Flags used by the linker during Release with Debug Info builds.
      CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
      
      //Path to a program.
      CMAKE_NM:FILEPATH=/usr/bin/nm
      
      //Path to a program.
      CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
      
      //Path to a program.
      CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
      
      //Value Computed by CMake
      CMAKE_PROJECT_NAME:STATIC=MySQL
      
      //Path to a program.
      CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
      
      //Flags used by the linker during the creation of dll's.
      CMAKE_SHARED_LINKER_FLAGS:STRING=' '
      
      //Flags used by the linker during debug builds.
      CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
      
      //Flags used by the linker during release minsize builds.
      CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the linker during release builds.
      CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
      
      //Flags used by the linker during Release with Debug Info builds.
      CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
      
      //If set, runtime paths are not added when installing shared libraries,
      // but are added when building.
      CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
      
      //If set, runtime paths are not added when using shared libraries.
      CMAKE_SKIP_RPATH:BOOL=NO
      
      //Flags used by the linker during the creation of static libraries.
      CMAKE_STATIC_LINKER_FLAGS:STRING=
      
      //Flags used by the linker during debug builds.
      CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
      
      //Flags used by the linker during release minsize builds.
      CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
      
      //Flags used by the linker during release builds.
      CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
      
      //Flags used by the linker during Release with Debug Info builds.
      CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
      
      //Path to a program.
      CMAKE_STRIP:FILEPATH=/usr/bin/strip
      
      //If true, cmake will use relative paths in makefiles and projects.
      CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
      
      //If this value is on, makefiles will be generated without the
      // .SILENT directive, and all commands will be echoed to the console
      // during the make.  This is useful for debugging only. With Visual
      // Studio IDE projects all commands are done without /nologo.
      CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
      
      //Don't build shared libraries, compile code as position-dependent
      DISABLE_SHARED:BOOL=OFF
      
      //Path to a program.
      DTRACE:FILEPATH=DTRACE-NOTFOUND
      
      //If we should should enable LOAD DATA LOCAL by default
      ENABLED_LOCAL_INFILE:BOOL=OFF
      
      //Enable profiling
      ENABLED_PROFILING:BOOL=ON
      
      //Enable gcov (debug, Linux builds only)
      ENABLE_GCOV:BOOL=OFF
      
      //Path to a program.
      GETCONF:FILEPATH=/usr/bin/getconf
      
      //git command line client
      GIT_EXECUTABLE:FILEPATH=GIT_EXECUTABLE-NOTFOUND
      
      //path to the executable
      GTAR_EXECUTABLE:FILEPATH=/usr/bin/gtar
      
      //BIN installation directory
      INSTALL_BINDIR:STRING=bin
      
      //DOC installation directory
      INSTALL_DOCDIR:STRING=docs
      
      //DOCREADME installation directory
      INSTALL_DOCREADMEDIR:STRING=.
      
      //INCLUDE installation directory
      INSTALL_INCLUDEDIR:STRING=include/mysql
      
      //INFO installation directory
      INSTALL_INFODIR:STRING=docs
      
      //Installation directory layout. Options are: STANDALONE (as in
      // zip or tar.gz installer) RPM DEB SVR4
      INSTALL_LAYOUT:STRING=STANDALONE
      
      //LIB installation directory
      INSTALL_LIBDIR:STRING=lib
      
      //MAN installation directory
      INSTALL_MANDIR:STRING=man
      
      //MYSQLDATA installation directory
      INSTALL_MYSQLDATADIR:STRING=data
      
      //MYSQLSHARE installation directory
      INSTALL_MYSQLSHAREDIR:STRING=share
      
      //MYSQLTEST installation directory
      INSTALL_MYSQLTESTDIR:STRING=mysql-test
      
      //PLUGIN installation directory
      INSTALL_PLUGINDIR:STRING=lib/plugin
      
      //SBIN installation directory
      INSTALL_SBINDIR:STRING=bin
      
      //SCRIPT installation directory
      INSTALL_SCRIPTDIR:STRING=scripts
      
      //SHARE installation directory
      INSTALL_SHAREDIR:STRING=share
      
      //SQLBENCH installation directory
      INSTALL_SQLBENCHDIR:STRING=.
      
      //SUPPORTFILES installation directory
      INSTALL_SUPPORTFILESDIR:STRING=support-files
      
      //SYSCONF2 installation directory
      INSTALL_SYSCONF2DIR:STRING=
      
      //SYSCONF installation directory
      INSTALL_SYSCONFDIR:STRING=
      
      //SYSTEMD_SYSUSERS installation directory
      INSTALL_SYSTEMD_SYSUSERSDIR:STRING=
      
      //SYSTEMD_TMPFILES installation directory
      INSTALL_SYSTEMD_TMPFILESDIR:STRING=
      
      //SYSTEMD_UNIT installation directory
      INSTALL_SYSTEMD_UNITDIR:STRING=
      
      //UNIX_ADDR installation directory
      INSTALL_UNIX_ADDRDIR:STRING=/tmp/mysql.sock
      
      //Set the entity that appears as the manufacturer of packages that
      // support a manufacturer field.
      MANUFACTURER:STRING=Built from Source
      
      //default MySQL data directory
      MYSQL_DATADIR:PATH=/usr/local/data/mariadb
      
      //MySQL maintainer-specific development environment. Options are:
      // ON OFF AUTO.
      MYSQL_MAINTAINER_MODE:STRING=AUTO
      
      //MySQL project name
      MYSQL_PROJECT_NAME:STRING=MySQL
      
      //Value Computed by CMake
      MySQL_BINARY_DIR:STATIC=/root/mariadb-10.3.7
      
      //Value Computed by CMake
      MySQL_SOURCE_DIR:STATIC=/root/mariadb-10.3.7
      
      //Allow linking with GPLv2-incompatible system libraries. Only
      // set it you never plan to distribute the resulting binaries
      NOT_FOR_DISTRIBUTION:BOOL=OFF
      
      //Use security-enhancing compiler features (stack protector, relro,
      // etc)
      SECURITY_HARDENED:BOOL=OFF
      
      //path to the executable
      TAR_EXECUTABLE:FILEPATH=/usr/bin/tar
      
      //PATH to MySQL TMP dir. Defaults to the P_tmpdir macro in <stdio.h>
      TMPDIR:PATH=
      
      //Build only the client library and clients
      WITHOUT_SERVER:BOOL=OFF
      
      //Enable address sanitizer
      WITH_ASAN:BOOL=OFF
      
      //Options are: none complex all
      WITH_EXTRA_CHARSETS:STRING=all
      
      //Compile with tcp wrappers support
      WITH_LIBWRAP:BOOL=OFF
      
      //Build with non-uniform memory access, allowing --innodb-numa-interleave.
      // Options are ON|OFF|AUTO. ON = enabled (requires NUMA library),
      // OFF = disabled, AUTO = enabled if NUMA library found.
      WITH_NUMA:STRING=AUTO
      
      //Which pcre to use (possible values are 'bundled', 'system', or
      // 'auto')
      WITH_PCRE:STRING=auto
      
      //Generate PIC objects
      WITH_PIC:BOOL=OFF
      
      //Use safemalloc memory debugger. Will result in slower execution.
      // Options are: ON OFF AUTO.
      WITH_SAFEMALLOC:STRING=AUTO
      
      //Enable thread sanitizer
      WITH_TSAN:BOOL=OFF
      
      //Compile MySQL with unit tests
      WITH_UNIT_TESTS:BOOL=ON
      
      //Valgrind instrumentation
      WITH_VALGRIND:BOOL=OFF
      
      //WSREP replication API (to use, e.g. Galera Replication library)
      WITH_WSREP:BOOL=ON
      
      
      ########################
      # INTERNAL cache entries
      ########################
      
      //Have includes bfd.h
      BFD_H_EXISTS:INTERNAL=
      //ADVANCED property for variable: CMAKE_AR
      CMAKE_AR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_BUILD_TOOL
      CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1
      //What is the target build tool cmake is generating for.
      CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/gmake
      //This is the directory where this CMakeCache.txt was created
      CMAKE_CACHEFILE_DIR:INTERNAL=/root/mariadb-10.3.7
      //Major version of cmake used to create the current loaded cache
      CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
      //Minor version of cmake used to create the current loaded cache
      CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
      //Patch version of cmake used to create the current loaded cache
      CMAKE_CACHE_PATCH_VERSION:INTERNAL=12
      //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
      CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
      //Path to CMake executable.
      CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
      //Path to cpack program executable.
      CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
      //Path to ctest program executable.
      CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
      //ADVANCED property for variable: CMAKE_CXX_COMPILER
      CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_CXX_FLAGS
      CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
      CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
      CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
      CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
      CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_COMPILER
      CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_FLAGS
      CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
      CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
      CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
      CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
      CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //Path to cache edit program executable.
      CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
      //Executable file format
      CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
      //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
      CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
      CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
      CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
      CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
      CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
      CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
      //Name of generator.
      CMAKE_GENERATOR:INTERNAL=Unix Makefiles
      //Name of generator toolset.
      CMAKE_GENERATOR_TOOLSET:INTERNAL=
      //Have includes pthread.h
      CMAKE_HAVE_PTHREAD_H:INTERNAL=
      //Start directory with the top level CMakeLists.txt file for this
      // project
      CMAKE_HOME_DIRECTORY:INTERNAL=/root/mariadb-10.3.7
      //Install .so files without execute permission.
      CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
      //ADVANCED property for variable: CMAKE_LINKER
      CMAKE_LINKER-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MAKE_PROGRAM
      CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
      CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
      CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
      CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
      CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
      CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_NM
      CMAKE_NM-ADVANCED:INTERNAL=1
      //number of local generators
      CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=1
      //ADVANCED property for variable: CMAKE_OBJCOPY
      CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_OBJDUMP
      CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_RANLIB
      CMAKE_RANLIB-ADVANCED:INTERNAL=1
      //Path to CMake installation.
      CMAKE_ROOT:INTERNAL=/usr/share/cmake
      //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
      CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
      CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
      CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
      CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
      CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //CHECK_TYPE_SIZE: unsigned int unknown
      CMAKE_SIZEOF_UNSIGNED_INT:INTERNAL=
      //CHECK_TYPE_SIZE: unsigned long unknown
      CMAKE_SIZEOF_UNSIGNED_LONG:INTERNAL=
      //CHECK_TYPE_SIZE: unsigned short unknown
      CMAKE_SIZEOF_UNSIGNED_SHORT:INTERNAL=
      //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
      CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_SKIP_RPATH
      CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
      CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
      CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
      CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
      CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
      CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_STRIP
      CMAKE_STRIP-ADVANCED:INTERNAL=1
      //uname command
      CMAKE_UNAME:INTERNAL=/usr/bin/uname
      //ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS
      CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
      CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
      //Directory of debug build
      DEBUGBUILDDIR:INTERNAL=/root/debug
      //ADVANCED property for variable: DTRACE
      DTRACE-ADVANCED:INTERNAL=1
      //Have symbol FIONREAD
      FIONREAD_IN_SYS_FILIO:INTERNAL=
      //Have symbol FIONREAD
      FIONREAD_IN_SYS_IOCTL:INTERNAL=
      //ADVANCED property for variable: GETCONF
      GETCONF-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: GIT_EXECUTABLE
      GIT_EXECUTABLE-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: GTAR_EXECUTABLE
      GTAR_EXECUTABLE-ADVANCED:INTERNAL=1
      //Have symbol TIOCGWINSZ
      GWINSZ_IN_SYS_IOCTL:INTERNAL=
      //Have function accept4
      HAVE_ACCEPT4:INTERNAL=
      //Have function access
      HAVE_ACCESS:INTERNAL=
      //Have function alarm
      HAVE_ALARM:INTERNAL=
      //Have includes alloca.h
      HAVE_ALLOCA_H:INTERNAL=
      //Have includes arpa/inet.h
      HAVE_ARPA_INET_H:INTERNAL=
      //Have includes asm/msr.h
      HAVE_ASM_MSR_H:INTERNAL=
      //Have includes asm/termbits.h
      HAVE_ASM_TERMBITS_H:INTERNAL=
      //Have function backtrace
      HAVE_BACKTRACE:INTERNAL=
      //Have function backtrace_symbols
      HAVE_BACKTRACE_SYMBOLS:INTERNAL=
      //Have function backtrace_symbols_fd
      HAVE_BACKTRACE_SYMBOLS_FD:INTERNAL=
      //Have function bfill
      HAVE_BFILL:INTERNAL=
      //Have function clock_gettime
      HAVE_CLOCK_GETTIME:INTERNAL=
      //Result of TRY_COMPILE
      HAVE_CMAKE_SIZEOF_UNSIGNED_INT:INTERNAL=FALSE
      //Result of TRY_COMPILE
      HAVE_CMAKE_SIZEOF_UNSIGNED_LONG:INTERNAL=FALSE
      //Result of TRY_COMPILE
      HAVE_CMAKE_SIZEOF_UNSIGNED_SHORT:INTERNAL=FALSE
      //Have function compress
      HAVE_COMPRESS:INTERNAL=
      //Have function crypt
      HAVE_CRYPT:INTERNAL=
      //Have includes crypt.h
      HAVE_CRYPT_H:INTERNAL=
      //Have function cuserid
      HAVE_CUSERID:INTERNAL=
      //Have symbol fdatasync
      HAVE_DECL_FDATASYNC:INTERNAL=
      //Have symbol madvise
      HAVE_DECL_MADVISE:INTERNAL=
      //Have symbol SHM_HUGETLB
      HAVE_DECL_SHM_HUGETLB:INTERNAL=
      //Have includes dirent.h
      HAVE_DIRENT_H:INTERNAL=
      //Have function dladdr
      HAVE_DLADDR:INTERNAL=
      //Have function dlerror
      HAVE_DLERROR:INTERNAL=
      //Have includes dlfcn.h
      HAVE_DLFCN_H:INTERNAL=
      //Have function dlopen
      HAVE_DLOPEN:INTERNAL=
      //Have includes execinfo.h
      HAVE_EXECINFO_H:INTERNAL=
      //Have function fchmod
      HAVE_FCHMOD:INTERNAL=
      //Have function fcntl
      HAVE_FCNTL:INTERNAL=
      //Have includes fcntl.h
      HAVE_FCNTL_H:INTERNAL=
      //Have function fdatasync
      HAVE_FDATASYNC:INTERNAL=
      //Have function fedisableexcept
      HAVE_FEDISABLEEXCEPT:INTERNAL=
      //Have includes fenv.h
      HAVE_FENV_H:INTERNAL=
      //Have function fesetround
      HAVE_FESETROUND:INTERNAL=
      //Have symbol finite
      HAVE_FINITE:INTERNAL=
      //Have symbol finite
      HAVE_FINITE_IN_MATH_H:INTERNAL=
      //Have includes float.h
      HAVE_FLOAT_H:INTERNAL=
      //Have includes fnmatch.h
      HAVE_FNMATCH_H:INTERNAL=
      //Have includes fpu_control.h
      HAVE_FPU_CONTROL_H:INTERNAL=
      //Have function fseeko
      HAVE_FSEEKO:INTERNAL=
      //Have function fsync
      HAVE_FSYNC:INTERNAL=
      //Have function ftime
      HAVE_FTIME:INTERNAL=
      //Have function ftruncate
      HAVE_FTRUNCATE:INTERNAL=
      //Have function getcwd
      HAVE_GETCWD:INTERNAL=
      //Have function gethostbyaddr_r
      HAVE_GETHOSTBYADDR_R:INTERNAL=
      //Have function gethrtime
      HAVE_GETHRTIME:INTERNAL=
      //Have function getifaddrs
      HAVE_GETIFADDRS:INTERNAL=
      //Have symbol getpagesize
      HAVE_GETPAGESIZE:INTERNAL=
      //Have function getpass
      HAVE_GETPASS:INTERNAL=
      //Have function getpassphrase
      HAVE_GETPASSPHRASE:INTERNAL=
      //Have function getpwnam
      HAVE_GETPWNAM:INTERNAL=
      //Have function getpwuid
      HAVE_GETPWUID:INTERNAL=
      //Have function getrlimit
      HAVE_GETRLIMIT:INTERNAL=
      //Have function getrusage
      HAVE_GETRUSAGE:INTERNAL=
      //Have function gettimeofday
      HAVE_GETTIMEOFDAY:INTERNAL=
      //Have function getwd
      HAVE_GETWD:INTERNAL=
      //Have function gmtime_r
      HAVE_GMTIME_R:INTERNAL=
      //Have includes grp.h
      HAVE_GRP_H:INTERNAL=
      //Have includes ia64intrin.h
      HAVE_IA64INTRIN_H:INTERNAL=
      //Have includes ieeefp.h
      HAVE_IEEEFP_H:INTERNAL=
      //Have function index
      HAVE_INDEX:INTERNAL=
      //Have function initgroups
      HAVE_INITGROUPS:INTERNAL=
      //Have includes inttypes.h
      HAVE_INTTYPES_H:INTERNAL=
      //Test HAVE_ISINF
      HAVE_ISINF:INTERNAL=
      //Have symbol isnan
      HAVE_ISNAN:INTERNAL=
      //Have includes langinfo.h
      HAVE_LANGINFO_H:INTERNAL=
      //Have function ldiv
      HAVE_LDIV:INTERNAL=
      //Have includes limits.h
      HAVE_LIMITS_H:INTERNAL=
      //Have includes link.h
      HAVE_LINK_H:INTERNAL=
      //Have includes linux/falloc.h
      HAVE_LINUX_FALLOC_H:INTERNAL=
      //Have includes linux/unistd.h
      HAVE_LINUX_UNISTD_H:INTERNAL=
      //Have includes locale.h
      HAVE_LOCALE_H:INTERNAL=
      //Have function localtime_r
      HAVE_LOCALTIME_R:INTERNAL=
      //Have symbol log2
      HAVE_LOG2:INTERNAL=
      //Have symbol lrand48
      HAVE_LRAND48:INTERNAL=
      //Have function lstat
      HAVE_LSTAT:INTERNAL=
      //Have function madvise
      HAVE_MADVISE:INTERNAL=
      //Have function mallinfo
      HAVE_MALLINFO:INTERNAL=
      //Have includes malloc.h
      HAVE_MALLOC_H:INTERNAL=
      //Have function memalign
      HAVE_MEMALIGN:INTERNAL=
      //Have function memcpy
      HAVE_MEMCPY:INTERNAL=
      //Have function memmove
      HAVE_MEMMOVE:INTERNAL=
      //Have includes memory.h
      HAVE_MEMORY_H:INTERNAL=
      //Have function mkostemp
      HAVE_MKOSTEMP:INTERNAL=
      //Have function mkstemp
      HAVE_MKSTEMP:INTERNAL=
      //Have function mlock
      HAVE_MLOCK:INTERNAL=
      //Have function mlockall
      HAVE_MLOCKALL:INTERNAL=
      //Have function mmap
      HAVE_MMAP:INTERNAL=
      //Have function mmap64
      HAVE_MMAP64:INTERNAL=
      //Have includes ndir.h
      HAVE_NDIR_H:INTERNAL=
      //Have includes netinet/in.h
      HAVE_NETINET_IN_H:INTERNAL=
      //Have function nl_langinfo
      HAVE_NL_LANGINFO:INTERNAL=
      //Have includes paths.h
      HAVE_PATHS_H:INTERNAL=
      //Have function perror
      HAVE_PERROR:INTERNAL=
      //Have function poll
      HAVE_POLL:INTERNAL=
      //Have includes poll.h
      HAVE_POLL_H:INTERNAL=
      //Have function posix_fallocate
      HAVE_POSIX_FALLOCATE:INTERNAL=
      //Have function pread
      HAVE_PREAD:INTERNAL=
      //Have function printstack
      HAVE_PRINTSTACK:INTERNAL=
      //Have function pthread_attr_create
      HAVE_PTHREAD_ATTR_CREATE:INTERNAL=
      //Have function pthread_attr_getguardsize
      HAVE_PTHREAD_ATTR_GETGUARDSIZE:INTERNAL=
      //Have function pthread_attr_getstacksize
      HAVE_PTHREAD_ATTR_GETSTACKSIZE:INTERNAL=
      //Have function pthread_attr_setscope
      HAVE_PTHREAD_ATTR_SETSCOPE:INTERNAL=
      //Have function pthread_attr_setstacksize
      HAVE_PTHREAD_ATTR_SETSTACKSIZE:INTERNAL=
      //Have function pthread_condattr_create
      HAVE_PTHREAD_CONDATTR_CREATE:INTERNAL=
      //Have function pthread_key_delete
      HAVE_PTHREAD_KEY_DELETE:INTERNAL=
      //Have function pthread_rwlock_rdlock
      HAVE_PTHREAD_RWLOCK_RDLOCK:INTERNAL=
      //Have function pthread_sigmask
      HAVE_PTHREAD_SIGMASK:INTERNAL=
      //Have function pthread_yield_np
      HAVE_PTHREAD_YIELD_NP:INTERNAL=
      //Have function putenv
      HAVE_PUTENV:INTERNAL=
      //Have includes pwd.h
      HAVE_PWD_H:INTERNAL=
      //Have function rdtscll
      HAVE_RDTSCLL:INTERNAL=
      //Test HAVE_READDIR_R
      HAVE_READDIR_R:INTERNAL=
      //Have function readlink
      HAVE_READLINK:INTERNAL=
      //Have function read_real_time
      HAVE_READ_REAL_TIME:INTERNAL=
      //Have function realpath
      HAVE_REALPATH:INTERNAL=
      //Have function rename
      HAVE_RENAME:INTERNAL=
      //Have symbol rint
      HAVE_RINT:INTERNAL=
      //Have function rwlock_init
      HAVE_RWLOCK_INIT:INTERNAL=
      //Have includes sched.h
      HAVE_SCHED_H:INTERNAL=
      //Have function sched_yield
      HAVE_SCHED_YIELD:INTERNAL=
      //Have includes select.h
      HAVE_SELECT_H:INTERNAL=
      //Have function setenv
      HAVE_SETENV:INTERNAL=
      //Have function setlocale
      HAVE_SETLOCALE:INTERNAL=
      //Have function sigaction
      HAVE_SIGACTION:INTERNAL=
      //Have function sigset
      HAVE_SIGSET:INTERNAL=
      //Have function sigthreadmask
      HAVE_SIGTHREADMASK:INTERNAL=
      //Have function sigwait
      HAVE_SIGWAIT:INTERNAL=
      //Result of TRY_COMPILE
      HAVE_SIZEOF_VOIDP:INTERNAL=FALSE
      //Have function sleep
      HAVE_SLEEP:INTERNAL=
      //Have function snprintf
      HAVE_SNPRINTF:INTERNAL=
      //Have includes stdarg.h
      HAVE_STDARG_H:INTERNAL=
      //Have include stddef.h
      HAVE_STDDEF_H:INTERNAL=
      //Have include stdint.h
      HAVE_STDINT_H:INTERNAL=
      //Have includes stdlib.h
      HAVE_STDLIB_H:INTERNAL=
      //Have function stpcpy
      HAVE_STPCPY:INTERNAL=
      //Have function strcasecmp
      HAVE_STRCASECMP:INTERNAL=
      //Have function strcoll
      HAVE_STRCOLL:INTERNAL=
      //Have function strerror
      HAVE_STRERROR:INTERNAL=
      //Have includes strings.h
      HAVE_STRINGS_H:INTERNAL=
      //Have includes string.h
      HAVE_STRING_H:INTERNAL=
      //Have function strnlen
      HAVE_STRNLEN:INTERNAL=
      //Have function strpbrk
      HAVE_STRPBRK:INTERNAL=
      //Have function strtok_r
      HAVE_STRTOK_R:INTERNAL=
      //Have function strtoll
      HAVE_STRTOLL:INTERNAL=
      //Have function strtoul
      HAVE_STRTOUL:INTERNAL=
      //Have function strtoull
      HAVE_STRTOULL:INTERNAL=
      //Have includes synch.h
      HAVE_SYNCH_H:INTERNAL=
      //Have includes sysent.h
      HAVE_SYSENT_H:INTERNAL=
      //Have includes sys/types.h;sys/dir.h
      HAVE_SYS_DIR_H:INTERNAL=
      //Have includes sys/types.h;sys/event.h
      HAVE_SYS_EVENT_H:INTERNAL=
      //Have includes sys/file.h
      HAVE_SYS_FILE_H:INTERNAL=
      //Have includes sys/fpu.h
      HAVE_SYS_FPU_H:INTERNAL=
      //Have includes sys/ioctl.h
      HAVE_SYS_IOCTL_H:INTERNAL=
      //Have includes sys/types.h;sys/ipc.h
      HAVE_SYS_IPC_H:INTERNAL=
      //Have includes sys/types.h;sys/malloc.h
      HAVE_SYS_MALLOC_H:INTERNAL=
      //Have includes sys/mman.h
      HAVE_SYS_MMAN_H:INTERNAL=
      //Have includes sys/ndir.h
      HAVE_SYS_NDIR_H:INTERNAL=
      //Have includes sys/param.h
      HAVE_SYS_PARAM_H:INTERNAL=
      //Have includes sys/poll.h
      HAVE_SYS_POLL_H:INTERNAL=
      //Have includes sys/prctl.h
      HAVE_SYS_PRCTL_H:INTERNAL=
      //Have includes sys/ptem.h
      HAVE_SYS_PTEM_H:INTERNAL=
      //Have includes sys/pte.h
      HAVE_SYS_PTE_H:INTERNAL=
      //Have includes sys/resource.h
      HAVE_SYS_RESOURCE_H:INTERNAL=
      //Have includes sys/select.h
      HAVE_SYS_SELECT_H:INTERNAL=
      //Have includes sys/types.h;sys/shm.h
      HAVE_SYS_SHM_H:INTERNAL=
      //Have includes sys/socket.h
      HAVE_SYS_SOCKET_H:INTERNAL=
      //Have includes sys/sockio.h
      HAVE_SYS_SOCKIO_H:INTERNAL=
      //Have includes sys/statvfs.h
      HAVE_SYS_STATVFS_H:INTERNAL=
      //Have includes sys/stat.h
      HAVE_SYS_STAT_H:INTERNAL=
      //Have includes sys/stream.h
      HAVE_SYS_STREAM_H:INTERNAL=
      //Have includes sys/syscall.h
      HAVE_SYS_SYSCALL_H:INTERNAL=
      //Have includes sys/times.h
      HAVE_SYS_TIMES_H:INTERNAL=
      //Have includes sys/time.h
      HAVE_SYS_TIME_H:INTERNAL=
      //Have include sys/types.h
      HAVE_SYS_TYPES_H:INTERNAL=
      //Have includes stdlib.h;sys/un.h
      HAVE_SYS_UN_H:INTERNAL=
      //Have includes sys/utime.h
      HAVE_SYS_UTIME_H:INTERNAL=
      //Have includes sys/utsname.h
      HAVE_SYS_UTSNAME_H:INTERNAL=
      //Have includes sys/vadvise.h
      HAVE_SYS_VADVISE_H:INTERNAL=
      //Have includes sys/wait.h
      HAVE_SYS_WAIT_H:INTERNAL=
      //Have function tell
      HAVE_TELL:INTERNAL=
      //Have includes termbits.h
      HAVE_TERMBITS_H:INTERNAL=
      //Have includes termcap.h
      HAVE_TERMCAP_H:INTERNAL=
      //Have includes termios.h
      HAVE_TERMIOS_H:INTERNAL=
      //Have includes termio.h
      HAVE_TERMIO_H:INTERNAL=
      //Have function thr_setconcurrency
      HAVE_THR_SETCONCURRENCY:INTERNAL=
      //Have function thr_yield
      HAVE_THR_YIELD:INTERNAL=
      //Have function time
      HAVE_TIME:INTERNAL=
      //Have function times
      HAVE_TIMES:INTERNAL=
      //Have includes time.h
      HAVE_TIME_H:INTERNAL=
      //Have symbol tzname
      HAVE_TZNAME:INTERNAL=
      //Have includes unistd.h
      HAVE_UNISTD_H:INTERNAL=
      //Have includes utime.h
      HAVE_UTIME_H:INTERNAL=
      //Have includes varargs.h
      HAVE_VARARGS_H:INTERNAL=
      //Have function vasprintf
      HAVE_VASPRINTF:INTERNAL=
      //Test HAVE_VISIBILITY_HIDDEN
      HAVE_VISIBILITY_HIDDEN:INTERNAL=
      //Have function vsnprintf
      HAVE_VSNPRINTF:INTERNAL=
      //Have includes wchar.h
      HAVE_WCHAR_H:INTERNAL=
      //Have includes wctype.h
      HAVE_WCTYPE_H:INTERNAL=
      //Have function __infinity
      HAVE___infinity_IN_LIBC:INTERNAL=
      //Have library m
      HAVE___infinity_IN_m:INTERNAL=
      //Have function bind
      HAVE_bind_IN_LIBC:INTERNAL=
      //Have library bind
      HAVE_bind_IN_bind:INTERNAL=
      //Have library socket
      HAVE_bind_IN_socket:INTERNAL=
      //Have function clock_gettime
      HAVE_clock_gettime_IN_LIBC:INTERNAL=
      //Have library rt
      HAVE_clock_gettime_IN_rt:INTERNAL=
      //Have function crypt
      HAVE_crypt_IN_LIBC:INTERNAL=
      //Have library crypt
      HAVE_crypt_IN_crypt:INTERNAL=
      //Have function dlopen
      HAVE_dlopen_IN_LIBC:INTERNAL=
      //Have library dl
      HAVE_dlopen_IN_dl:INTERNAL=
      //Have function floor
      HAVE_floor_IN_LIBC:INTERNAL=
      //Have library m
      HAVE_floor_IN_m:INTERNAL=
      //Have function gethostbyname_r
      HAVE_gethostbyname_r_IN_LIBC:INTERNAL=
      //Have library nsl
      HAVE_gethostbyname_r_IN_nsl:INTERNAL=
      //Have library nsl_r
      HAVE_gethostbyname_r_IN_nsl_r:INTERNAL=
      //Have function sched_yield
      HAVE_sched_yield_IN_LIBC:INTERNAL=
      //Have library rt
      HAVE_sched_yield_IN_rt:INTERNAL=
      //Have function setsockopt
      HAVE_setsockopt_IN_LIBC:INTERNAL=
      //Have library socket
      HAVE_setsockopt_IN_socket:INTERNAL=
      //ADVANCED property for variable: INSTALL_BINDIR
      INSTALL_BINDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_DOCDIR
      INSTALL_DOCDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_DOCREADMEDIR
      INSTALL_DOCREADMEDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_INCLUDEDIR
      INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_INFODIR
      INSTALL_INFODIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_LIBDIR
      INSTALL_LIBDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_MANDIR
      INSTALL_MANDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_MYSQLDATADIR
      INSTALL_MYSQLDATADIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_MYSQLSHAREDIR
      INSTALL_MYSQLSHAREDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_MYSQLTESTDIR
      INSTALL_MYSQLTESTDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_PLUGINDIR
      INSTALL_PLUGINDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SBINDIR
      INSTALL_SBINDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SCRIPTDIR
      INSTALL_SCRIPTDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SHAREDIR
      INSTALL_SHAREDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SQLBENCHDIR
      INSTALL_SQLBENCHDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SUPPORTFILESDIR
      INSTALL_SUPPORTFILESDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SYSCONF2DIR
      INSTALL_SYSCONF2DIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SYSCONFDIR
      INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SYSTEMD_SYSUSERSDIR
      INSTALL_SYSTEMD_SYSUSERSDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SYSTEMD_TMPFILESDIR
      INSTALL_SYSTEMD_TMPFILESDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_SYSTEMD_UNITDIR
      INSTALL_SYSTEMD_UNITDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: INSTALL_UNIX_ADDRDIR
      INSTALL_UNIX_ADDRDIR-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: MANUFACTURER
      MANUFACTURER-ADVANCED:INTERNAL=1
      //ADVANCED property for variable: MYSQL_BASE_VERSION
      MYSQL_BASE_VERSION-ADVANCED:INTERNAL=1
      //MySQL Base version
      MYSQL_BASE_VERSION:INTERNAL=10.3
      //ADVANCED property for variable: MYSQL_PROJECT_NAME
      MYSQL_PROJECT_NAME-ADVANCED:INTERNAL=1
      OLD_INSTALL_LAYOUT:INTERNAL=STANDALONE
      //CHECK_TYPE_SIZE: void * unknown
      SIZEOF_VOIDP:INTERNAL=
      //Have includes stdlib.h;stdarg.h;string.h;float.h
      STDC_HEADERS:INTERNAL=
      //ADVANCED property for variable: TAR_EXECUTABLE
      TAR_EXECUTABLE-ADVANCED:INTERNAL=1
      //Have symbol TIOCSTAT
      TIOCSTAT_IN_SYS_IOCTL:INTERNAL=
      //ADVANCED property for variable: WITH_PIC
      WITH_PIC-ADVANCED:INTERNAL=1
      //WSREP version
      WSREP_VERSION:INTERNAL=25.23
      //Test have_CXX__ggdb3
      have_CXX__ggdb3:INTERNAL=
      //Test have_C__ggdb3
      have_C__ggdb3:INTERNAL=

      1. コンパイル最適化設定を行う
        export CFLAGS="-O3 -m64"
      2. インストール場所とデータ用ディレクトリを分ける場合は、データ用ディレクトリを作成する
        # データ格納場所を/usr/local/data/mariadbとする
        mkdir -p -m 774 /usr/local/data/mariadb
        chown mariadb:mariadb /usr/local/data/mariadb
      3. インストール設定を行う
        cmake -DCMAKE_INSTALL_PREFIX=/usr/local/`pwd | sed "s/.*\///"` -DMYSQL_DATADIR=/usr/local/data/mariadb 2>&1 | tee cmake.log.`date +"%Y%m%d_%H%M%S"`
        # このコマンドの後、CMakeCache.txtファイルが生成されるので、全てのオプション値が確認できる
        次のメッセージが表示された場合、エラーが発生している。
        -- Configuring incomplete, errors occurred!
        内容は上部の、次の出力の次にある。
        -- Packaging as: mariadb-10.3.7-Linux-x86_64
        エラー対応後、再ビルド前には次のコマンドを実行する必要がある。
        rm -f CMakeCache.txt
        次のメッセージが出力されると設定は終了している。
        -- Configuring done
        この時、次のようなエラーメッセージが出ていても問題ない。
        fatal: Not a git repository (or any of the parent directories): .git
      4. コンパイルする
        ※長時間かかるので注意
        make 2>&1 | tee make.log.`date +"%Y%m%d_%H%M%S"`
      5. インストールを行う。
        make install 2>&1 | tee make_install.log.`date +"%Y%m%d_%H%M%S"`
  5. リンク作成、環境変数設定などを行う
    1. インストールディレクトリへのシンボリックリンクを作成する。
      これによって、複数のバージョンを同居させ、リンクを切り替えることで、バージョン変更が可能となる。
      各バージョンの実行ファイルはデフォルトでは各バージョンの設定ファイルを読み込むこととなる。
      rm -f /usr/local/mariadb
      ln -s /usr/local/`pwd | sed "s/.*\///"` /usr/local/mariadb
    2. 簡単にアクセスできるように環境変数を設定する
      export MARIADB_HOME=/usr/local/mariadb
      export MARIADB_DATA=/usr/local/data/mariadb
    3. ツール類にパスを通す
      export PATH=$MARIADB_HOME/bin:$PATH
    4. 環境変数を再起動後も有効にする
      echo "" >> /etc/bashrc
      echo "# MARIADB ENVIRONMENT VARIABLE" >> /etc/bashrc
      echo "export MARIADB_HOME=$MARIADB_HOME" >> /etc/bashrc
      echo "export PATH=\$MARIADB_HOME/bin:\$PATH" >> /etc/bashrc
      echo "export MARIADB_DATA=$MARIADB_DATA" >> /etc/bashrc
    5. パスが通ったことを確認する
      mysqld --version
  6. 不要なソースコードを削除する
    cd ../
    rm -rf mariadb*
  7. インストールしたディレクトリに移動する
    cd $MARIADB_HOME
  8. 不要ファイルを削除する
    rm -f COPYING*
    rm -f CREDITS
    rm -f EXCEPTIONS-CLIENT
    rm -f INSTALL-BINARY
    rm -f README*
    rm -rf docs
  9. ログ用ディレクトリを作成する
    mkdir log
  10. 空の設定ファイルを作成する
    このパスは固定で組み込まれているので変更してはならない。
    echo "[mysqld]" > $MARIADB_HOME/my.cnf
  11. 所有者を変更する
    chown -R mariadb:mariadb /usr/local/mariadb*
  12. データディレクトリにデータベースをインストールする
    scripts/mysql_install_db --datadir=$MARIADB_DATA --user=mariadb
    • ログ

      [root@localhost mariadb]# scripts/mysql_install_db --datadir=$MARIADB_DATA --user=mariadb
      Installing MariaDB/MySQL system tables in '/usr/local/data/mariadb' ...
      OK
      
      To start mysqld at boot time you have to copy
      support-files/mysql.server to the right place for your system
      
      PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
      To do so, start the server, then issue the following commands:
      
      './bin/mysqladmin' -u root password 'new-password'
      './bin/mysqladmin' -u root -h mariadb.corp password 'new-password'
      
      Alternatively you can run:
      './bin/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.
      
      You can start the MariaDB daemon with:
      cd '.' ; ./bin/mysqld_safe --datadir='/usr/local/data/mariadb'
      
      You can test the MariaDB daemon with mysql-test-run.pl
      cd './mysql-test' ; perl mysql-test-run.pl
      
      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/
  13. MariaDBを起動する
    mysqld_safe --basedir=$MARIADB_HOME --datadir=$MARIADB_DATA --log-error=$MARIADB_HOME/log/log --user=mariadb &
    起動確認は次のコマンドで行える。
    mysqladmin version
    • 実行結果
      mysqladmin  Ver 9.1 Distrib 10.3.7-MariaDB, for Linux on x86_64
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
      
      Server version          10.3.7-MariaDB
      Protocol version        10
      Connection              Localhost via UNIX socket
      UNIX socket             /tmp/mysql.sock
      Uptime:                 6 min 3 sec
      
      Threads: 7  Questions: 1  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 0.002
  14. 機能のテストを行う。
    ただし、任意であり、特に必要でもない。
    1. 必要なパッケージをインストールする。
      テストを行う場合、perl関連のパッケージがインストールされている必要がある。
      yum install perl perl-Data-Dumper -y
    2. テストを実行する
      cd $MARIADB_HOME/mysql-test; perl mysql-test-run.pl
      下記は何故か常に失敗する。
      公式既定の全てのパッケージをインストールしても失敗する。
      ただし、rocksdbはrocksdbストレージエンジンを使用しなければ問題ないため、無視する。
      • ログ

        rocksdb.mariadb_plugin                   [ pass ]    426
        rocksdb.mariadb_port_rpl                 [ pass ]     48
        rocksdb.2pc_group_commit                 [ fail ]
        
        The servers were restarted 7 times
        Spent 23.754 of 61 seconds executing testcases
        
        Failure: Failed 1/50 tests, 98.00% were successful.
        
        Failing test(s): rocksdb.2pc_group_commit
        
        The log files in var/log may give you some hint of what went wrong.
        
        If you want to report this error, please read first the documentation
        at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
        
        751 tests were skipped, 23 by the test itself.
        
        mysql-test-run: *** ERROR: there were failing test cases
  15. セキュア化する
    インストール直後のデフォルト状態では様々なセキュリティ上のリスクが存在する。
    それらをまとめて修正できるスクリプトが用意されている。
    このスクリプトでは以下を行う。
    • rootユーザにパスワードを設定する
    • rootユーザのリモートログインを禁止する(localhost、127.0.0.1、::1からのみアクセスできるようにする)
    • 匿名ユーザを削除する
    • testデータベースを削除する
      以下スクリプトを実行する。対話的に実行されるが、パスワードの入力以外はそのままエンターを押しておけばよい(Y入力と同義)。
      mysql_secure_installation
    • ログ

      [root@mariadb mariadb]# mysql_secure_installation
      
      NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
            SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
      
      In order to log into MariaDB to secure it, we'll need the current
      password for the root user.  If you've just installed MariaDB, and
      you haven't set the root password yet, the password will be blank,
      so you should just press enter here.
      
      Enter current password for root (enter for none):
      OK, successfully used password, moving on...
      
      Setting the root password ensures that nobody can log into the MariaDB
      root user without the proper authorisation.
      
      Set root password? [Y/n]
      New password:
      Re-enter new password:
      Password updated successfully!
      Reloading privilege tables..
       ... Success!
      
      
      By default, a MariaDB installation has an anonymous user, allowing anyone
      to log into MariaDB without having to have a user account created for
      them.  This is intended only for testing, and to make the installation
      go a bit smoother.  You should remove them before moving into a
      production environment.
      
      Remove anonymous users? [Y/n]
       ... Success!
      
      Normally, root should only be allowed to connect from 'localhost'.  This
      ensures that someone cannot guess at the root password from the network.
      
      Disallow root login remotely? [Y/n]
       ... Success!
      
      By default, MariaDB comes with a database named 'test' that anyone can
      access.  This is also intended only for testing, and should be removed
      before moving into a production environment.
      
      Remove test database and access to it? [Y/n]
       - Dropping test database...
       ... Success!
       - Removing privileges on test database...
       ... Success!
      
      Reloading the privilege tables will ensure that all changes made so far
      will take effect immediately.
      
      Reload privilege tables now? [Y/n]
       ... Success!
      
      Cleaning up...
      
      All done!  If you've completed all of the above steps, your MariaDB
      installation should now be secure.
      
      Thanks for using MariaDB!
  16. 接続確認する
    rootユーザでログインできることを確認する。
    mysql -p
    # ログイン後、次を実行する。
    show databases;
    exit
    • ログ

      [root@mariadb mariadb]# mysql -p
      Enter password:
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 17
      Server version: 10.3.7-MariaDB Source distribution
      
      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)]> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | mysql              |
      | performance_schema |
      +--------------------+
      3 rows in set (0.017 sec)
      
      MariaDB [(none)]> exit;
      Bye

      削除されたtestデータベース以外に「information_schema」、「mysql」、「performance_schema」データベースが初期状態で作成されているが、いずれも必要なのでおいておく。
  17. systemdの設定する
    1. サービスファイルを作成する
      停止時にパスワードを求められるため、通常の停止方法を定義できない。
      そのため、Systemdによる終了はkillとなるが、データ破損を防ぐため、MariDBでは起動以外でSystemdを使用するべきではない。
      cat > /etc/systemd/system/mariadb.service << EOT
      [Unit]
      Description=MariaDB database server
      After=local-network.target syslog.target
      
      [Service]
      Type=simple
      ExecStart=/usr/local/mariadb/bin/mysqld_safe --basedir=$MARIADB_HOME --datadir=$MARIADB_DATA --log-error=$MARIADB_HOME/log/log --user=mariadb
      TimeoutSec=300
      
      [Install]
      WantedBy=multi-user.target
      EOT
    2. サービスを有効化する
      systemctl enable mariadb
    3. サービスが有効化されていることを確認する
      systemctl list-unit-files --type service --no-pager | grep mariadb
  18. MariaDBを停止する
    mysqladmin shutdown -p

 

MariaDB設定

 

 

設定方法

 

my.confについて


MariaDBの設定はmy.confファイルに記述する。
ここにはMariaDBサーバの設定のほかMariaDBクライアントなどMariaDBに関する全ての設定を記述する。
ただし、サーバの設定はmysqldセクションというようにセクションで区切られる。
設定ファイルによる設定を反映させる場合、MariaDBの再起動が必要となる。

 

設定ファイルパス


基本的にはこちらを使用する。

$MARIADB_HOME/my.cnf


MariaDB起動オプションで明示的に設定ファイルのパスを指定することもできるが、
指定しなかった場合は、以下のファイルなどから設定が自動的に読み込まれる。

  1. /etc/my.cnf
  2. /etc/mysql/my.cnf
  3. SYSCONFDIR/my.cnf (SYSCONFDIRはMariaDBビルド時に指定したパス。デフォルトではインストール先のディレクトリ)
  4. $MARIADB_HOME/my.cnf
  5. –dafaults-extra-file (MariaDB起動オプションで設定ファイルのパスを指定する)
  6. ~/my.cnf
  7. コマンドラインオプション (MariaDB起動オプションで設定値を指定する)


上記の順に設定が読み込まれ、重複した場合は後から設定された(読み込まれた)ものが有効になる。
なお、–defaults-extra-fileオプションを使用してファイルを指定した場合、そのファイル以外の設定ファイルは読み込まれなくなる。

 

変数について


設定ファイルによる設定のほか、起動時にオプションとして渡したり、
mysqlコマンドによって動作中のMariaDBに設定を行うことができる。
各設定値は変数として表され、変数の値を変更することで、設定を変更できる。
各変数の意味はこちらを参照。

 


なお、変数名のアンダースコア(_)はハイフン(-)に置換可能。

現在の変数の一覧はmysqladminコマンドで確認できる。

mysqladmin variables -p

 

記法

 

設定値


以下のように記述する。

<設定項目> = <値>


設定値の欄において括弧の意味は以下。

 

セクション


設定群をカテゴリ化している。
次のように記載する。

[<カテゴリ名>]

 

コメント


先頭に#を付けることでコメントアウト可能

# xxx = yyy

 

標準設定一覧


現在の変数の一覧はmysqladminコマンドで確認できる。

mysqladmin variables -p

ビルドオプション、起動オプションしか設定していない場合の設定値のデフォルトは以下の通り。

alter_algorithm=DEFAULT
aria_block_size=8192
aria_checkpoint_interval=30
aria_checkpoint_log_activity=1048576
aria_encrypt_tables=OFF
aria_force_start_after_recovery_failures=0
aria_group_commit=none
aria_group_commit_interval=0
aria_log_file_size=1073741824
aria_log_purge_type=immediate
aria_max_sort_file_size=9223372036853727232
aria_page_checksum=ON
aria_pagecache_age_threshold=300
aria_pagecache_buffer_size=134217728
aria_pagecache_division_limit=100
aria_pagecache_file_hash_size=512
aria_recover_options=BACKUP,QUICK
aria_repair_threads=1
aria_sort_buffer_size=268434432
aria_stats_method=nulls_unequal
aria_sync_log_dir=NEWFILE
aria_used_for_temp_tables=ON
auto_increment_increment=1
auto_increment_offset=1
autocommit=ON
automatic_sp_privileges=ON
back_log=80
basedir=/usr/local/mariadb
big_tables=OFF
bind_address
binlog_annotate_row_events=ON
binlog_cache_size=32768
binlog_checksum=CRC32
binlog_commit_wait_count=0
binlog_commit_wait_usec=100000
binlog_direct_non_transactional_updates=OFF
binlog_file_cache_size=16384
binlog_format=MIXED
binlog_optimize_thread_scheduling=ON
binlog_row_image=FULL
binlog_stmt_cache_size=32768
bulk_insert_buffer_size=8388608
character_set_client=utf8
character_set_connection=utf8
character_set_database=latin1
character_set_filesystem=binary
character_set_results=utf8
character_set_server=latin1
character_set_system=utf8
character_sets_dir=/usr/local/mariadb-10.3.7/share/charsets/
check_constraint_checks=ON
collation_connection=utf8_general_ci
collation_database=latin1_swedish_ci
collation_server=latin1_swedish_ci
column_compression_threshold=100
column_compression_zlib_level=6
column_compression_zlib_strategy=DEFAULT_STRATEGY
column_compression_zlib_wrap=OFF
completion_type=NO_CHAIN
concurrent_insert=AUTO
connect_timeout=10
datadir=/usr/local/data/mariadb/
date_format=%Y-%m-%d
datetime_format=%Y-%m-%d=%H:%i:%s
deadlock_search_depth_long=15
deadlock_search_depth_short=4
deadlock_timeout_long=50000000
deadlock_timeout_short=10000
debug_no_thread_alarm=OFF
default_master_connection
default_regex_flags
default_storage_engine=InnoDB
default_tmp_storage_engine
default_week_format=0
delay_key_write=ON
delayed_insert_limit=100
delayed_insert_timeout=300
delayed_queue_size=1000
div_precision_increment=4
encrypt_binlog=OFF
encrypt_tmp_disk_tables=OFF
encrypt_tmp_files=OFF
enforce_storage_engine
error_count=0
event_scheduler=OFF
expensive_subquery_limit=100
expire_logs_days=0
explicit_defaults_for_timestamp=OFF
external_user
extra_max_connections=1
extra_port=0
flush=OFF
flush_time=0
foreign_key_checks=ON
ft_boolean_syntax=+=-><()~*:""&|
ft_max_word_len=84
ft_min_word_len=4
ft_query_expansion_limit=20
ft_stopword_file=(built-in)
general_log=OFF
general_log_file=mariadb.log
group_concat_max_len=1048576
gtid_binlog_pos
gtid_binlog_state
gtid_current_pos
gtid_domain_id=0
gtid_ignore_duplicates=OFF
gtid_pos_auto_engines
gtid_seq_no=0
gtid_slave_pos
gtid_strict_mode=OFF
have_compress=YES
have_crypt=YES
have_dynamic_loading=YES
have_geometry=YES
have_openssl=YES
have_profiling=YES
have_query_cache=YES
have_rtree_keys=YES
have_ssl=DISABLED
have_symlink=YES
histogram_size=0
histogram_type=SINGLE_PREC_HB
host_cache_size=279
hostname=mariadb
identity=0
idle_readonly_transaction_timeout=0
idle_transaction_timeout=0
idle_write_transaction_timeout=0
ignore_builtin_innodb=OFF
ignore_db_dirs
in_transaction=0
init_connect
init_file
init_slave
innodb_adaptive_flushing=ON
innodb_adaptive_flushing_lwm=10.000000
innodb_adaptive_hash_index=ON
innodb_adaptive_hash_index_parts=8
innodb_adaptive_max_sleep_delay=150000
innodb_autoextend_increment=64
innodb_autoinc_lock_mode=1
innodb_background_scrub_data_check_interval=3600
innodb_background_scrub_data_compressed=OFF
innodb_background_scrub_data_interval=604800
innodb_background_scrub_data_uncompressed=OFF
innodb_buf_dump_status_frequency=0
innodb_buffer_pool_chunk_size=134217728
innodb_buffer_pool_dump_at_shutdown=ON
innodb_buffer_pool_dump_now=OFF
innodb_buffer_pool_dump_pct=25
innodb_buffer_pool_filename=ib_buffer_pool
innodb_buffer_pool_instances=1
innodb_buffer_pool_load_abort=OFF
innodb_buffer_pool_load_at_startup=ON
innodb_buffer_pool_load_now=OFF
innodb_buffer_pool_size=134217728
innodb_change_buffer_max_size=25
innodb_change_buffering=all
innodb_checksum_algorithm=crc32
innodb_checksums=ON
innodb_cmp_per_index_enabled=OFF
innodb_commit_concurrency=0
innodb_compression_algorithm=zlib
innodb_compression_default=OFF
innodb_compression_failure_threshold_pct=5
innodb_compression_level=6
innodb_compression_pad_pct_max=50
innodb_concurrency_tickets=5000
innodb_data_file_path=ibdata1:12M:autoextend
innodb_data_home_dir
innodb_deadlock_detect=ON
innodb_default_encryption_key_id=1
innodb_default_row_format=dynamic
innodb_defragment=OFF
innodb_defragment_fill_factor=0.900000
innodb_defragment_fill_factor_n_recs=20
innodb_defragment_frequency=40
innodb_defragment_n_pages=7
innodb_defragment_stats_accuracy=0
innodb_disable_sort_file_cache=OFF
innodb_disallow_writes=OFF
innodb_doublewrite=ON
innodb_encrypt_log=OFF
innodb_encrypt_tables=OFF
innodb_encryption_rotate_key_age=1
innodb_encryption_rotation_iops=100
innodb_encryption_threads=0
innodb_fast_shutdown=1
innodb_fatal_semaphore_wait_threshold=600
innodb_file_per_table=ON
innodb_fill_factor=100
innodb_flush_log_at_timeout=1
innodb_flush_log_at_trx_commit=1
innodb_flush_method=fsync
innodb_flush_neighbors=1
innodb_flush_sync=ON
innodb_flushing_avg_loops=30
innodb_force_load_corrupted=OFF
innodb_force_primary_key=OFF
innodb_force_recovery=0
innodb_ft_aux_table
innodb_ft_cache_size=8000000
innodb_ft_enable_diag_print=OFF
innodb_ft_enable_stopword=ON
innodb_ft_max_token_size=84
innodb_ft_min_token_size=3
innodb_ft_num_word_optimize=2000
innodb_ft_result_cache_limit=2000000000
innodb_ft_server_stopword_table
innodb_ft_sort_pll_degree=2
innodb_ft_total_cache_size=640000000
innodb_ft_user_stopword_table
innodb_idle_flush_pct=100
innodb_immediate_scrub_data_uncompressed=OFF
innodb_io_capacity=200
innodb_io_capacity_max=2000
innodb_lock_schedule_algorithm=vats
innodb_lock_wait_timeout=50
innodb_locks_unsafe_for_binlog=OFF
innodb_log_buffer_size=16777216
innodb_log_checksums=ON
innodb_log_compressed_pages=ON
innodb_log_file_size=50331648
innodb_log_files_in_group=2
innodb_log_group_home_dir=./
innodb_log_write_ahead_size=8192
innodb_lru_scan_depth=1024
innodb_max_dirty_pages_pct=75.000000
innodb_max_dirty_pages_pct_lwm=0.000000
innodb_max_purge_lag=0
innodb_max_purge_lag_delay=0
innodb_max_undo_log_size=10485760
innodb_monitor_disable
innodb_monitor_enable
innodb_monitor_reset
innodb_monitor_reset_all
innodb_old_blocks_pct=37
innodb_old_blocks_time=1000
innodb_online_alter_log_max_size=134217728
innodb_open_files=2000
innodb_optimize_fulltext_only=OFF
innodb_page_cleaners=1
innodb_page_size=16384
innodb_prefix_index_cluster_optimization=OFF
innodb_print_all_deadlocks=OFF
innodb_purge_batch_size=300
innodb_purge_rseg_truncate_frequency=128
innodb_purge_threads=4
innodb_random_read_ahead=OFF
innodb_read_ahead_threshold=56
innodb_read_io_threads=4
innodb_read_only=OFF
innodb_replication_delay=0
innodb_rollback_on_timeout=OFF
innodb_rollback_segments=128
innodb_scrub_log=OFF
innodb_scrub_log_speed=256
innodb_sort_buffer_size=1048576
innodb_spin_wait_delay=4
innodb_stats_auto_recalc=ON
innodb_stats_include_delete_marked=OFF
innodb_stats_method=nulls_equal
innodb_stats_modified_counter=0
innodb_stats_on_metadata=OFF
innodb_stats_persistent=ON
innodb_stats_persistent_sample_pages=20
innodb_stats_sample_pages=8
innodb_stats_traditional=ON
innodb_stats_transient_sample_pages=8
innodb_status_output=OFF
innodb_status_output_locks=OFF
innodb_strict_mode=ON
innodb_sync_array_size=1
innodb_sync_spin_loops=30
innodb_table_locks=ON
innodb_temp_data_file_path=ibtmp1:12M:autoextend
innodb_thread_concurrency=0
innodb_thread_sleep_delay=10000
innodb_tmpdir
innodb_undo_directory=./
innodb_undo_log_truncate=OFF
innodb_undo_logs=128
innodb_undo_tablespaces=0
innodb_use_atomic_writes=ON
innodb_use_native_aio=ON
innodb_version=10.3.7
innodb_write_io_threads=4
insert_id=0
interactive_timeout=28800
join_buffer_size=262144
join_buffer_space_limit=2097152
join_cache_level=2
keep_files_on_create=OFF
key_buffer_size=134217728
key_cache_age_threshold=300
key_cache_block_size=1024
key_cache_division_limit=100
key_cache_file_hash_size=512
key_cache_segments=0
large_files_support=ON
large_page_size=0
large_pages=OFF
last_gtid
last_insert_id=0
lc_messages=en_US
lc_messages_dir
lc_time_names=en_US
license=GPL
local_infile=ON
lock_wait_timeout=86400
locked_in_memory=OFF
log_bin=OFF
log_bin_basename
log_bin_compress=OFF
log_bin_compress_min_len=256
log_bin_index
log_bin_trust_function_creators=OFF
log_disabled_statements=sp
log_error=/usr/local/mariadb/log/log.err
log_output=FILE
log_queries_not_using_indexes=OFF
log_slave_updates=OFF
log_slow_admin_statements=ON
log_slow_disabled_statements=sp
log_slow_filter=admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
log_slow_rate_limit=1
log_slow_slave_statements=ON
log_slow_verbosity
log_tc_size=24576
log_warnings=2
long_query_time=10.000000
low_priority_updates=OFF
lower_case_file_system=OFF
lower_case_table_names=0
master_verify_checksum=OFF
max_allowed_packet=16777216
max_binlog_cache_size=18446744073709547520
max_binlog_size=1073741824
max_binlog_stmt_cache_size=18446744073709547520
max_connect_errors=100
max_connections=151
max_delayed_threads=20
max_digest_length=1024
max_error_count=64
max_heap_table_size=16777216
max_insert_delayed_threads=20
max_join_size=18446744073709551615
max_length_for_sort_data=1024
max_long_data_size=16777216
max_prepared_stmt_count=16382
max_recursive_iterations=4294967295
max_relay_log_size=1073741824
max_seeks_for_key=4294967295
max_session_mem_used=9223372036854775807
max_sort_length=1024
max_sp_recursion_depth=0
max_statement_time=0.000000
max_tmp_tables=32
max_user_connections=0
max_write_lock_count=4294967295
metadata_locks_cache_size=1024
metadata_locks_hash_instances=8
min_examined_row_limit=0
mrr_buffer_size=262144
multi_range_count=256
myisam_block_size=1024
myisam_data_pointer_size=6
myisam_max_sort_file_size=9223372036853727232
myisam_mmap_size=18446744073709551615
myisam_recover_options=BACKUP,QUICK
myisam_repair_threads=1
myisam_sort_buffer_size=134216704
myisam_stats_method=NULLS_UNEQUAL
myisam_use_mmap=OFF
mysql56_temporal_format=ON
net_buffer_length=16384
net_read_timeout=30
net_retry_count=10
net_write_timeout=60
old=OFF
old_alter_table=DEFAULT
old_mode
old_passwords=OFF
open_files_limit=4182
optimizer_prune_level=1
optimizer_search_depth=62
optimizer_selectivity_sampling_limit=100
optimizer_switch=index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
optimizer_use_condition_selectivity=1
performance_schema=OFF
performance_schema_accounts_size=-1
performance_schema_digests_size=-1
performance_schema_events_stages_history_long_size=-1
performance_schema_events_stages_history_size=-1
performance_schema_events_statements_history_long_size=-1
performance_schema_events_statements_history_size=-1
performance_schema_events_waits_history_long_size=-1
performance_schema_events_waits_history_size=-1
performance_schema_hosts_size=-1
performance_schema_max_cond_classes=80
performance_schema_max_cond_instances=-1
performance_schema_max_digest_length=1024
performance_schema_max_file_classes=50
performance_schema_max_file_handles=32768
performance_schema_max_file_instances=-1
performance_schema_max_mutex_classes=200
performance_schema_max_mutex_instances=-1
performance_schema_max_rwlock_classes=40
performance_schema_max_rwlock_instances=-1
performance_schema_max_socket_classes=10
performance_schema_max_socket_instances=-1
performance_schema_max_stage_classes=160
performance_schema_max_statement_classes=200
performance_schema_max_table_handles=-1
performance_schema_max_table_instances=-1
performance_schema_max_thread_classes=50
performance_schema_max_thread_instances=-1
performance_schema_session_connect_attrs_size=-1
performance_schema_setup_actors_size=100
performance_schema_setup_objects_size=100
performance_schema_users_size=-1
pid_file=/usr/local/data/mariadb/mariadb.pid
plugin_dir=/usr/local/mariadb/lib/plugin/
plugin_maturity=gamma
port=3306
preload_buffer_size=32768
profiling=OFF
profiling_history_size=15
progress_report_time=5
protocol_version=10
proxy_protocol_networks
proxy_user
pseudo_slave_mode=OFF
pseudo_thread_id=13
query_alloc_block_size=16384
query_cache_limit=1048576
query_cache_min_res_unit=4096
query_cache_size=1048576
query_cache_strip_comments=OFF
query_cache_type=OFF
query_cache_wlock_invalidate=OFF
query_prealloc_size=24576
rand_seed1=128937583
rand_seed2=21942803
range_alloc_block_size=4096
read_binlog_speed_limit=0
read_buffer_size=131072
read_only=OFF
read_rnd_buffer_size=262144
relay_log
relay_log_basename
relay_log_index
relay_log_info_file=relay-log.info
relay_log_purge=ON
relay_log_recovery=OFF
relay_log_space_limit=0
replicate_annotate_row_events=ON
replicate_do_db
replicate_do_table
replicate_events_marked_for_skip=REPLICATE
replicate_ignore_db
replicate_ignore_table
replicate_wild_do_table
replicate_wild_ignore_table
report_host
report_password
report_port=3306
report_user
rowid_merge_buff_size=8388608
rpl_semi_sync_master_enabled=OFF
rpl_semi_sync_master_timeout=10000
rpl_semi_sync_master_trace_level=32
rpl_semi_sync_master_wait_no_slave=ON
rpl_semi_sync_master_wait_point=AFTER_COMMIT
rpl_semi_sync_slave_delay_master=OFF
rpl_semi_sync_slave_enabled=OFF
rpl_semi_sync_slave_kill_conn_timeout=5
rpl_semi_sync_slave_trace_level=32
secure_auth=ON
secure_file_priv
secure_timestamp=NO
server_id=1
session_track_schema=ON
session_track_state_change=OFF
session_track_system_variables=autocommit,character_set_client,character_set_connection,character_set_results,time_zone
session_track_transaction_info=OFF
skip_external_locking=ON
skip_name_resolve=OFF
skip_networking=OFF
skip_parallel_replication=OFF
skip_replication=OFF
skip_show_database=OFF
slave_compressed_protocol=OFF
slave_ddl_exec_mode=IDEMPOTENT
slave_domain_parallel_threads=0
slave_exec_mode=STRICT
slave_load_tmpdir=/tmp
slave_max_allowed_packet=1073741824
slave_net_timeout=60
slave_parallel_max_queued=131072
slave_parallel_mode=conservative
slave_parallel_threads=0
slave_parallel_workers=0
slave_run_triggers_for_rbr=NO
slave_skip_errors=OFF
slave_sql_verify_checksum=ON
slave_transaction_retries=10
slave_transaction_retry_errors=1213,1205
slave_transaction_retry_interval=0
slave_type_conversions
slow_launch_time=2
slow_query_log=OFF
slow_query_log_file=mariadb-slow.log
socket=/tmp/mysql.sock
sort_buffer_size=2097152
sql_auto_is_null=OFF
sql_big_selects=ON
sql_buffer_result=OFF
sql_log_bin=ON
sql_log_off=OFF
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql_notes=ON
sql_quote_show_create=ON
sql_safe_updates=OFF
sql_select_limit=18446744073709551615
sql_slave_skip_counter=0
sql_warnings=OFF
ssl_ca
ssl_capath
ssl_cert
ssl_cipher
ssl_crl
ssl_crlpath
ssl_key
standard_compliant_cte=ON
storage_engine=InnoDB
stored_program_cache=256
strict_password_validation=ON
sync_binlog=0
sync_frm=ON
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000
system_time_zone=UTC
system_versioning_alter_history=ERROR
system_versioning_asof=DEFAULT
table_definition_cache=400
table_open_cache=2000
table_open_cache_instances=8
tcp_keepalive_interval=0
tcp_keepalive_probes=0
tcp_keepalive_time=0
thread_cache_size=151
thread_concurrency=10
thread_handling=one-thread-per-connection
thread_pool_idle_timeout=60
thread_pool_max_threads=65536
thread_pool_oversubscribe=3
thread_pool_prio_kickup_timer=1000
thread_pool_priority=auto
thread_pool_size=1
thread_pool_stall_limit=500
thread_stack=299008
time_format=%H:%i:%s
time_zone=SYSTEM
timed_mutexes=OFF
timestamp=1528380463.292578
tmp_disk_table_size=18446744073709551615
tmp_memory_table_size=16777216
tmp_table_size=16777216
tmpdir=/tmp
transaction_alloc_block_size=8192
transaction_prealloc_size=4096
tx_isolation=REPEATABLE-READ
tx_read_only=OFF
unique_checks=ON
updatable_views_with_limit=YES
use_stat_tables=NEVER
userstat=OFF
version=10.3.7-MariaDB
version_comment=Source=distribution
version_compile_machine=x86_64
version_compile_os=Linux
version_malloc_library=system
version_source_revision=4a49f7f88cfa82ae6eb8e7b5a528e91416b33b52
version_ssl_library=OpenSSL=1.0.2k-fips==26=Jan=2017
wait_timeout=28800
warning_count=0
wsrep_osu_method=TOI
wsrep_auto_increment_control=ON
wsrep_causal_reads=OFF
wsrep_certify_nonpk=ON
wsrep_cluster_address
wsrep_cluster_name=my_wsrep_cluster
wsrep_convert_lock_to_trx=OFF
wsrep_data_home_dir=/usr/local/data/mariadb/
wsrep_dbug_option
wsrep_debug=OFF
wsrep_desync=OFF
wsrep_dirty_reads=OFF
wsrep_drupal_282555_workaround=OFF
wsrep_forced_binlog_format=NONE
wsrep_gtid_domain_id=0
wsrep_gtid_mode=OFF
wsrep_load_data_splitting=ON
wsrep_log_conflicts=OFF
wsrep_max_ws_rows=0
wsrep_max_ws_size=2147483647
wsrep_mysql_replication_bundle=0
wsrep_node_address
wsrep_node_incoming_address=AUTO
wsrep_node_name=mariadb
wsrep_notify_cmd
wsrep_on=OFF
wsrep_patch_version=wsrep_25.23
wsrep_provider=none
wsrep_provider_options
wsrep_recover=OFF
wsrep_reject_queries=NONE
wsrep_replicate_myisam=OFF
wsrep_restart_slave=OFF
wsrep_retry_autocommit=1
wsrep_slave_fk_checks=ON
wsrep_slave_uk_checks=OFF
wsrep_slave_threads=1
wsrep_sst_auth
wsrep_sst_donor
wsrep_sst_donor_rejects_queries=OFF
wsrep_sst_method=rsync
wsrep_sst_receive_address=AUTO
wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
wsrep_sync_wait=0

 

パラメータ

基本設定

パス

basedir

実行時データの格納場所

 

datadir

DBデータの格納場所。

datadirを変更する際はsocketもdatadir直下に変更する必要がある。
そうしないと起動時に次のようなエラーが出る。

[Note] InnoDB: Using Linux native AIO
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] mysqld: File '<変更後パス>/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '<変更後パス>/aria_log_control'
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

 

tmpdir

 

pid_file

 

plugin_dir

 

socket

UNIXソケットファイルのパス。
datadir配下に設定する必要がある。

 

 

alter_algorithm

 

autocommit

 

automatic_sp_privileges

 

back_log

 

big_tables

 

bind_address

 

bulk_insert_buffer_size

 

cassandra_default_thrift_host

 

cassandra_failure_retries

 

cassandra_insert_batch_size

 

cassandra_multiget_batch_size

 

cassandra_read_consistency

 

cassandra_rnd_batch_size

 

cassandra_write_consistency

 

character_set_client

 

character_set_connection

 

character_set_database

 

character_set_filesystem

 

character_set_results

 

character_set_server

 

character_set_system

 

character_sets_dir

 

check_constraint_checks

 

collation_connection

 

collation_database

 

collation_server

 

column_compression_threshold

 

column_compression_zlib_level

 

column_compression_zlib_strategy

 

column_compression_zlib_wrap

 

completion_type

 

concurrent_insert

 

connect_timeout

 

cracklib_password_check

 

cracklib_password_check_dictionary

 

date_format

 

datetime_format

 

deadlock_search_depth_long

 

deadlock_search_depth_short

 

deadlock_timeout_long

 

deadlock_timeout_short

 

debug

 

debug_no_thread_alarm

 

debug_sync

 

default_master_connection

 

default_regex_flags

 

default_storage_engine

 

default_table_type

 

default_tmp_storage_engine

 

default_week_format

 

delay_key_write

 

delayed_insert_limit

 

delayed_insert_timeout

 

delayed_queue_size

 

div_precision_increment

 

encrypt_binlog

 

encrypt_tmp_disk_tables

 

encrypt_tmp_files

 

encryption_algorithm

 

enforce_storage_engine

 

engine_condition_pushdown

 

error_count

 

event_scheduler

 

expensive_subquery_limit

 

expire_logs_days

 

explicit_defaults_for_timestamp

 

external_user

 

extra_max_connections

 

extra_port

 

feedback

 

feedback_http_proxy

 

feedback_send_retry_wait

 

feedback_send_timeout

 

feedback_url

 

feedback_user_info

 

flush

 

flush_time

 

foreign_key_checks

 

ft_boolean_syntax

 

ft_max_word_len

 

ft_min_word_len

 

ft_query_expansion_limit

 

ft_stopword_file

 

group_concat_max_len

 

gtid_seq_no

 

gtid_slave_pos

 

gtid_strict_mode

 

handlersocket_sndbuf

 

have_compress

 

have_crypt

 

have_csv

 

have_dynamic_loading

 

have_geometry

 

have_ndbcluster

 

have_partitioning

 

have_profiling

 

have_query_cache

 

have_rtree_keys

 

have_symlink

 

histogram_size

 

histogram_type

 

host_cache_size

 

hostname

 

identity

 

idle_readonly_transaction_timeout

 

idle_transaction_timeout


待機中のトランザクションを強制終了するまでの時間。
0の場合、強制終了しない。

idle_write_transaction_timeout

 

ignore_db_dirs

 

in_transaction

 

init_connect

 

init_file

 

init_slave

 

innodb_background_scrub_data-compressed

 

innodb_background_scrub_data-uncompressed

 

innodb_default_page_encryption_key

 

innodb_immediate_scrub_data-uncompressed

 

innodb_mtflush_threads

 

innodb_sched_priority_cleaner

 

innodb_temp_data_file_path

 

insert_id

 

interactive_timeout

 

join_buffer_size

 

join_buffer_space_limit

 

join_cache_level

 

keep_files_on_create

 

language

 

large_files_support

 

large_page_size

 

large_pages

 

last_gtid

 

last_insert_id

 

lc_messages

 

lc_messages_dir

 

lc_time_names

 

license

 

local_infile

 

lock_wait_timeout

 

locked_in_memory

 

low_priority_updates

 

lower_case_file_system

 

lower_case_table_names

 

master_retry_count

 

master_verify_checksum

 

max_allowed_packet

 

max_binlog_cache_size

 

max_binlog_size

 

max_binlog_stmt_cache_size

 

max_connect_errors

 

max_connections

 

max_delayed_threads

 

max_digest_length

 

max_error_count

 

max_heap_table_size

 

max_insert_delayed_threads

 

max_join_size

 

max_length_for_sort_data

 

max_long_data_size

 

max_prepared_stmt_count

 

max_recursive_iterations

 

max_relay_log_size

 

max_seeks_for_key

 

max_session_mem_used

 

max_sort_length

 

max_sp_recursion_depth

 

max_statement_time

 

max_tmp_tables

 

max_user_connections

 

max_write_lock_count

 

metadata_locks_cache_size

 

metadata_locks_hash_instances

 

min_examined_row_limit

 

mrr_buffer_size

 

multi_range_count

 

mysql56_temporal_format

 

named_pipe

 

net_buffer_length

 

net_read_timeout

 

net_retry_count

 

net_write_timeout

 

old

 

old_alter_table

 

old_mode

 

old_passwords

 

open_files_limit

 

optimizer_prune_level

 

optimizer_search_depth

 

optimizer_selectivity_sampling_limit

 

optimizer_switch

 

optimizer_use_condition_selectivity

 

oqgraph_allow_create_integer_latch

 

pam_use_cleartext_plugin

 

plugin_maturity

 

port

 

preload_buffer_size

 

profiling

 

profiling_history_size

 

progress_report_time

 

protocol_version

 

proxy_protocol_networks

 

proxy_user

 

pseudo_slave_mode

 

pseudo_thread_id

 

query_alloc_block_size

 

query_cache_limit

 

query_cache_min_res_unit

 

query_cache_size

 

query_cache_strip_comments

 

query_cache_type

 

query_cache_wlock_invalidate

 

query_prealloc_size

 

query_response_time_flush

 

query_response_time_range_base

 

query_response_time_range_exec_time_debug

 

query_response_time_stats

 

rand_seed1

 

rand_seed2

 

range_alloc_block_size

 

read_buffer_size

 

read_only

 

read_rnd_buffer_size

 

rowid_merge_buff_size

 

rpl_recovery_rank

 

rpl_semi_sync_master_enabled

 

rpl_semi_sync_master_timeout

 

rpl_semi_sync_master_trace_level

 

rpl_semi_sync_master_wait_no_slave

 

rpl_semi_sync_master_wait_point

 

rpl_semi_sync_slave_delay_master

 

rpl_semi_sync_slave_enabled

 

rpl_semi_sync_slave_kill_conn_timeout

 

rpl_semi_sync_slave_trace_level

 

safe_show_database

 

secure_auth

 

secure_file_priv

 

secure_timestamp

 

session_track_schema

 

session_track_state_change

 

session_track_system_variables

 

session_track_transaction_info

 

shared_memory

 

shared_memory_base_name

 

simple_password_check_digits

 

simple_password_check_letters_same_case

 

simple_password_check_minimal_length

 

simple_password_check_other_characters

 

skip_external_locking

 

skip_name_resolve

 

skip_networking

 

skip_show_database

 

sort_buffer_size

 

sql_auto_is_null

 

sql_big_selects

 

sql_big_tables

 

sql_buffer_result

 

sql_log_off

 

sql_log_update

 

sql_low_priority_updates

 

sql_max_join_size

 

sql_mode

 

sql_notes

 

sql_quote_show_create

 

sql_safe_updates

 

sql_select_limit

 

sql_warnings

 

storage_engine

 

standard_compliant_cte

 

stored_program_cache

 

strict_password_validation

 

sync_frm

 

system_time_zone

 

system_versioning_alter_history

 

system_versioning_asof

 

system_versioning_innodb_algorithm_simple

 

table_definition_cache


テーブル定義情報のキャッシュのエントリ数。

 

 

table_lock_wait_timeout

 

table_open_cache

 

table_open_cache_instances

 

table_type

 

tcp_keepalive_interval

 

tcp_keepalive_probes

 

tcp_keepalive_time

 

time_format

 

time_zone

 

timed_mutexes

 

timestamp

 

tmp_disk_table_size

 

tmp_memory_table_size

 

tmp_table_size

 

transaction_alloc_block_size

 

transaction_prealloc_size

 

tx_isolation

 

tx_read_only

 

unique_checks

 

updatable_views_with_limit

 

use_stat_tables

 

userstat

 

version

 

version_comment

 

version_compile_machine

 

version_compile_os

 

version_malloc_library

 

version_source_revision

 

wait_timeout


クローズされないコネクションのタイムアウト時間

 

 

warning_count

 

slow_launch_time


ここで設定時間以上スレッドの起動に時間がかかるとslow_launch_threads値がカウントアップされる。

 



ログ




log

 

log_bin

 

log_bin_basename

 

log_bin_compress

 

log_bin_compress_min_len

 

log_bin_index

 

log_bin_trust_function_creators

 

log_disabled_statements

 

log_error

 

log_output

 

log_slave_updates

 

log_slow_admin_statements

 

log_slow_disabled_statements

 

log_slow_filter

 

log_slow_queries

 

log_slow_rate_limit

 

log_slow_slave_statements

 

log_slow_verbosity

 

log_tc_size

 

log_warnings



スローログ

 

slow_query_log


スローログを出力するかどうか

 

 

slow_query_log_file


スローログをファイルに出力する場合、出力ファイル名

 

 

long_query_time


この設定で指定した時間以上クエリの実行に時間がかかった場合にスローログを出力する。

 

 

log_queries_not_using_indexes


インデックスを使用していないクエリをスローログに書き出すかどうか

 



クエリログ


クエリログを有効にすると実行されたあらゆるクエリが保存される。

general_log

 

 

general_log_file


指定したファイル名で、次のパスに出力される。

$MARIADB_DATA/

 



スレッド

 

thread_cache_size


キャッシュするスレッド数

 

 

thread_concurrency

 

thread_stack




CONNECT System Variables

 

 

connect_class_path

 

connect_conv_size

 

connect_enable_mongo

 

connect_exact_info

 

connect_indx_map

 

connect_java_wrapper

 

connect_json_grp_size

 

connect_json_null

 

connect_jvm_path

 

connect_type_conv

 

connect_use_tempfile

 

connect_work_size

 

connect_xtrace



Global Transaction ID System Variables

 

 

gtid_slave_pos

 

gtid_binlog_pos

 

gtid_binlog_state

 

gtid_current_pos

 

gtid_strict_mode

 

gtid_domain_id

 

last_gtid

 

server_id

 

gtid_seq_no

 

gtid_ignore_duplicates

 

gtid_pos_auto_engines




HandlerSocket Plugin System Variables

 

 

handlersocket_accept_balance

 

handlersocket_address

 

handlersocket_backlog

 

handlersocket_epoll

 

handlersocket_plain_secret

 

handlersocket_plain_secret_wr

 

handlersocket_port

 

handlersocket_port_wr

 

handlersocket_rcvbuf

 

handlersocket_readsize

 

handlersocket_sndbuf

 

handlersocket_threads

 

handlersocket_threads_wr

 

handlersocket_timeout

 

handlersocket_verbose

 

handlersocket_wrlock_timeout



XtraDB/InnoDB System Variables

 

 

have_innodb

 

ignore_builtin_innodb

 

innodb_adaptive_checkpoint

 

innodb_adaptive_flushing

 

innodb_adaptive_flushing_lwm

 

innodb_adaptive_flushing_method

 

innodb_adaptive_hash_index

 

innodb_adaptive_hash_index_partitions

 

innodb_adaptive_hash_index_parts

 

innodb_adaptive_max_sleep_delay

 

innodb_additional_mem_pool_size

 

innodb_api_bk_commit_interval

 

innodb_api_disable_rowlock

 

innodb_api_enable_binlog

 

innodb_api_enable_mdl

 

innodb_api_trx_level

 

innodb_auto_lru_dump

 

innodb_autoextend_increment

 

innodb_autoinc_lock_mode

 

innodb_background_scrub_data_check_interval

 

innodb_background_scrub_data_compressed

 

innodb_background_scrub_data_interval

 

innodb_background_scrub_data_uncompressed

 

innodb_blocking_buffer_pool_restore

 

innodb_buf_dump_status_frequency

 

innodb_buffer_pool_chunk_size

 

innodb_buffer_pool_dump_at_shutdown

 

innodb_buffer_pool_dump_now

 

innodb_buffer_pool_dump_pct

 

innodb_buffer_pool_evict

 

innodb_buffer_pool_filename

 

innodb_buffer_pool_instances

 

innodb_buffer_pool_load_abort

 

innodb_buffer_pool_load_at_startup

 

innodb_buffer_pool_load_now

 

innodb_buffer_pool_populate

 

innodb_buffer_pool_restore_at_startup

 

innodb_buffer_pool_shm_checksum

 

innodb_buffer_pool_shm_key

 

innodb_buffer_pool_size


InnoDBで使用するバッファサイズ。

 

innodb_change_buffer_max_size

 

innodb_change_buffering

 

innodb_change_buffering_debug

 

innodb_checkpoint_age_target

 

innodb_checksum_algorithm

 

innodb_checksums

 

innodb_cleaner_lsn_age_factor

 

innodb_cmp_per_index_enabled

 

innodb_commit_concurrency

 

innodb_compression_algorithm

 

innodb_compression_default

 

innodb_compression_failure_threshold_pct

 

innodb_compression_level

 

innodb_compression_pad_pct_max

 

innodb_concurrency_tickets

 

innodb_corrupt_table_action

 

innodb_data_file_path

 

innodb_data_home_dir

 

innodb_deadlock_detect

 

innodb_default_page_encryption_key

 

innodb_default_encryption_key_id

 

innodb_default_row_format

 

innodb_defragment

 

innodb_defragment_fill_factor

 

innodb_defragment_fill_factor_n_recs

 

innodb_defragment_frequency

 

innodb_defragment_n_pages

 

innodb_defragment_stats_accuracy

 

innodb_dict_size_limit

 

innodb_disable_sort_file_cache

 

innodb_disallow_writes

 

innodb_doublewrite

 

innodb_doublewrite_file

 

innodb_empty_free_list_algorithm

 

innodb_enable_unsafe_group_commit

 

innodb_encrypt_log

 

innodb_encrypt_tables

 

innodb_encryption_rotate_key_age

 

innodb_encryption_rotation_iops

 

innodb_encryption_threads

 

innodb_extra_rsegments

 

innodb_extra_undoslots

 

innodb_fake_changes

 

innodb_fast_checksum

 

innodb_fast_shutdown

 

innodb_fatal_semaphore_wait_threshold

 

innodb_file_format

 

innodb_file_format_check

 

innodb_file_format_max

 

innodb_file_per_table

 

innodb_fill_factor

 

innodb_flush_log_at_timeout

 

innodb_flush_log_at_trx_commit

 

innodb_flush_method

 

innodb_flush_neighbor_pages

 

innodb_flush_neighbors

 

innodb_flush_sync

 

innodb_flushing_avg_loops

 

innodb_force_load_corrupted

 

innodb_force_primary_key

 

innodb_force_recovery

 

innodb_foreground_preflush

 

innodb_ft_aux_table

 

innodb_ft_cache_size

 

innodb_ft_enable_diag_print

 

innodb_ft_enable_stopword

 

innodb_ft_max_token_size

 

innodb_ft_min_token_size

 

innodb_ft_num_word_optimize

 

innodb_ft_result_cache_limit

 

innodb_ft_server_stopword_table

 

innodb_ft_sort_pll_degree

 

innodb_ft_total_cache_size

 

innodb_ft_user_stopword_table

 

innodb_ibuf_accel_rate

 

innodb_ibuf_active_contract

 

innodb_ibuf_max_size

 

innodb_idle_flush_pct

 

innodb_immediate_scrub_data_uncompressed

 

innodb_import_table_from_xtrabackup

 

innodb_instrument_semaphores

 

innodb_io_capacity

 

innodb_io_capacity_max

 

innodb_kill_idle_transaction

 

innodb_large_prefix

 

innodb_lazy_drop_table

 

innodb_lock_schedule_algorithm

 

innodb_lock_wait_timeout

 

innodb_locking_fake_changes

 

innodb_locks_unsafe_for_binlog

 

innodb_log_arch_dir

 

innodb_log_arch_expire_sec

 

innodb_log_archive

 

innodb_log_block_size

 

innodb_log_buffer_size

 

innodb_log_checksum_algorithm

 

innodb_log_checksums

 

innodb_log_compressed_pages

 

innodb_log_file_size

 

innodb_log_files_in_group

 

innodb_log_group_home_dir

 

innodb_log_write_ahead_size

 

innodb_lru_scan_depth

 

innodb_max_bitmap_file_size

 

innodb_max_changed_pages

 

innodb_max_dirty_pages_pct

 

innodb_max_dirty_pages_pct_lwm

 

innodb_max_purge_lag

 

innodb_max_purge_lag_delay

 

innodb_max_undo_log_size

 

innodb_merge_sort_block_size

 

innodb_mirrored_log_groups

 

innodb_mtflush_threads

 

innodb_monitor_disable

 

innodb_monitor_enable

 

innodb_monitor_reset

 

innodb_monitor_reset_all

 

innodb_numa_interleave

 

innodb_old_blocks_pct

 

innodb_old_blocks_time

 

innodb_online_alter_log_max_size

 

innodb_open_files

 

innodb_optimize_fulltext_only

 

innodb_page_cleaners

 

innodb_page_size

 

innodb_pass_corrupt_table

 

innodb_prefix_index_cluster_optimization

 

innodb_print_all_deadlocks

 

innodb_purge_batch_size

 

innodb_purge_rseg_truncate_frequency

 

innodb_purge_threads

 

innodb_random_read_ahead

 

innodb_read_ahead

 

innodb_read_ahead_threshold

 

innodb_read_io_threads

 

innodb_read_only

 

innodb_recovery_stats

 

innodb_recovery_update_relay_log

 

innodb_replication_delay

 

innodb_rollback_on_timeout

 

innodb_rollback_segments

 

innodb_scrub_log

 

innodb_scrub_log_interval

 

innodb_scrub_log_speed

 

innodb_sched_priority_cleaner

 

innodb_show_locks_held

 

innodb_show_verbose_locks

 

innodb_simulate_comp_failures

 

innodb_sort_buffer_size

 

innodb_spin_wait_delay

 

innodb_stats_auto_recalc

 

innodb_stats_auto_update

 

innodb_stats_include_delete_marked

 

innodb_stats_method

 

innodb_stats_modified_counter

 

innodb_stats_on_metadata

 

innodb_stats_persistent

 

innodb_stats_persistent_sample_pages

 

innodb_stats_sample_pages

 

innodb_stats_traditional

 

innodb_stats_transient_sample_pages

 

innodb_stats_update_need_lock

 

innodb_status_output

 

innodb_status_output_locks

 

innodb_strict_mode

 

innodb_support_xa

 

innodb_sync_array_size

 

innodb_sync_spin_loops

 

innodb_table_locks

 

innodb_thread_concurrency

 

innodb_thread_concurrency_timer_based

 

innodb_thread_sleep_delay

 

innodb_temp_data_file_path

 

innodb_tmpdir

 

innodb_track_changed_pages

 

innodb_track_redo_log_now

 

innodb_undo_directory

 

innodb_undo_log_truncate

 

innodb_undo_logs

 

innodb_undo_tablespaces

 

innodb_use_atomic_writes

 

innodb_use_fallocate

 

innodb_use_global_flush_log_at_trx_commit

 

innodb_use_mtflush

 

innodb_use_native_aio

 

innodb_use_purge_thread

 

innodb_use_stacktrace

 

innodb_use_sys_malloc

 

innodb_use_sys_stats_table

 

innodb_use_trim

 

innodb_version

 

innodb_write_io_threads



Performance Schema System Variables


Performance Schemaとはデータベースのパフォーマンス情報の収集の仕組みのことである。

 

performance_schema


Performance Schemaを有効にするかどうか。

 

 

performance_schema_accounts_size

 

performance_schema_digests_size

 

performance_schema_events_stages_history_long_size

 

performance_schema_events_stages_history_size

 

performance_schema_events_statements_history_long_size

 

performance_schema_events_statements_history_size

 

performance_schema_events_waits_history_long_size

 

performance_schema_events_waits_history_size

 

performance_schema_hosts_size

 

performance_schema_max_cond_classes

 

performance_schema_max_cond_instances

 

performance_schema_max_digest_length

 

performance_schema_max_file_classes

 

performance_schema_max_file_handles

 

performance_schema_max_file_instances

 

performance_schema_max_mutex_classes

 

performance_schema_max_mutex_instances

 

performance_schema_max_rwlock_classes

 

performance_schema_max_rwlock_instances

 

performance_schema_max_socket_classes

 

performance_schema_max_socket_instances

 

performance_schema_max_stage_classes

 

performance_schema_max_statement_classes

 

performance_schema_max_table_handles

 

performance_schema_max_table_instances

 

performance_schema_max_thread_classes

 

performance_schema_max_thread_instances

 

performance_schema_session_connect_attrs_size

 

performance_schema_setup_actors_size

 

performance_schema_setup_objects_size

 

performance_schema_users_size



Replication and Binary Log System Variables

 

 

auto_increment_increment

 

auto_increment_offset

 

binlog_annotate_row_events

 

binlog_cache_size

 

binlog_checksum

 

binlog_commit_wait_count

 

binlog_commit_wait_usec

 

binlog_direct_non_transactional_updates

 

binlog_file_cache_size

 

binlog_format

 

binlog_optimize_thread_scheduling

 

binlog_row_image

 

binlog_stmt_cache_size

 

default_master_connection

 

encrypt_binlog

 

expire_logs_days

 

gtid_binlog_pos

 

gtid_binlog_state

 

gtid_current_pos

 

gtid_domain_id

 

gtid_seq_no

 

gtid_slave_pos

 

gtid_strict_mode

 

gtid_pos_auto_engines

 

init_slave

 

last_gtid

 

log_bin

 

log_bin_basename

 

log_bin_compress

 

log_bin_compress_min_len

 

log_bin_index

 

log_bin_trust_function_creators

 

log_slow_slave_statements

 

log_slave_updates

 

master_retry_count

 

master_verify_checksum

 

max_binlog_cache_size

 

max_binlog_size

 

max_binlog_stmt_cache_size

 

max_relay_log_size

 

read_binlog_speed_limit

 

relay_log

 

relay_log_basename

 

relay_log_index

 

relay_log_info_file

 

relay_log_purge

 

relay_log_recovery

 

relay_log_space_limit

 

replicate_annotate_row_events

 

replicate_do_db

 

replicate_do_table

 

replicate_events_marked_for_skip

 

replicate_ignore_db

 

replicate_ignore_table

 

replicate_rewrite_db

 

replicate_wild_do_table

 

replicate_wild_ignore_table

 

report_host

 

report_password

 

report_port

 

report_user

 

server_id

 

skip_parallel_replication

 

skip_replication

 

slave_compressed_protocol

 

slave_ddl_exec_mode

 

slave_domain_parallel_threads

 

slave_exec_mode

 

slave_load_tmpdir

 

slave_max_allowed_packet

 

slave_net_timeout

 

slave_parallel_max_queued

 

slave_parallel_mode

 

slave_parallel_threads

 

slave_parallel_workers

 

slave_run_triggers_for_rbr

 

slave_skip_errors

 

slave_sql_verify_checksum

 

slave_transaction_retries

 

slave_transaction_retry_errors

 

slave_transaction_retry_interval

 

slave_type_conversions

 

sql_log_bin

 

sql_slave_skip_counter

 

sync_binlog

 

sync_master_info

 

sync_relay_log

 

sync_relay_log_info



Server_Audit System Variables

 

 

server_audit_events

 

server_audit_excl_users

 

server_audit_file_path

 

server_audit_file_rotate_now

 

server_audit_file_rotate_size

 

server_audit_file_rotations

 

server_audit_incl_users

 

server_audit_loc_info

 

server_audit_logging

 

server_audit_mode

 

server_audit_output_type

 

server_audit_query_log_limit

 

server_audit_syslog_facility

 

server_audit_syslog_ident

 

server_audit_syslog_info

 

server_audit_syslog_priority



SQL_ERROR_LOG Plugin System Variables

 

 

sql_error_log_filename

 

sql_error_log_rate

 

sql_error_log_rotate

 

sql_error_log_rotations

 

sql_error_log_size_limit



Threadpool System Variables

 

 

extra_max_connections

 

extra_port

 

thread_handling

 

thread_pool_idle_timeout


アイドル状態のスレッドが終了するまでの時間

thread_pool_max_threads

 

thread_pool_min_threads

 

thread_pool_oversubscribe

 

thread_pool_prio_kickup_timer

 

thread_pool_priority

 

thread_pool_size

 

thread_pool_stall_limit

 

Threadpool_idle_threads

 

Threadpool_threads



Aria System Variables

 

 

aria_block_size

 

aria_checkpoint_interval

 

aria_checkpoint_log_activity

 

aria_encrypt_tables

 

aria_force_start_after_recovery_failures

 

aria_group_commit

 

aria_group_commit_interval

 

aria_log_dir_path

 

aria_log_file_size

 

aria_log_purge_type

 

aria_max_sort_file_size

 

aria_page_checksum

 

aria_pagecache_age_threshold

 

aria_pagecache_buffer_size

 

aria_pagecache_division_limit

 

aria_pagecache_file_hash_size

 

aria_recover

 

aria_recover_options

 

aria_repair_threads

 

aria_sort_buffer_size

 

aria_stats_method

 

aria_sync_log_dir

 

aria_used_for_temp_tables

 

deadlock_search_depth_long

 

deadlock_search_depth_short

 

deadlock_timeout_long

 

deadlock_timeout_short



Galera System Variables

 

 

wsrep_auto_increment_control

 

wsrep_causal_reads

 

wsrep_certify_nonPK

 

wsrep_cluster_address

 

wsrep_cluster_name

 

wsrep_convert_LOCK_to_trx

 

wsrep_data_home_dir

 

wsrep_dbug_option

 

wsrep_debug

 

wsrep_desync

 

wsrep_dirty_reads

 

wsrep_drupal_282555_workaround

 

wsrep_forced_binlog_format

 

wsrep_gtid_domain_id

 

wsrep_gtid_mode

 

wsrep_load_data_splitting

 

wsrep_log_conflicts

 

wsrep_max_ws_rows

 

wsrep_max_ws_size

 

wsrep_mysql_replication_bundle

 

wsrep_node_address

 

wsrep_node_incoming_address

 

wsrep_node_name

 

wsrep_notify_cmd

 

wsrep_on

 

wsrep_OSU_method

 

wsrep_patch_version

 

wsrep_provider

 

wsrep_provider_options

 

wsrep_recover

 

wsrep_reject_queries

 

wsrep_replicate_myisam

 

wsrep_restart_slave

 

wsrep_retry_autocommit

 

wsrep_slave_FK_checks

 

wsrep_slave_threads

 

wsrep_slave_UK_checks

 

wsrep_sst_auth

 

wsrep_sst_donor

 

wsrep_sst_donor_rejects_queries

 

wsrep_sst_method

 

wsrep_sst_receive_address

 

wsrep_start_position

 

wsrep_sync_wait



Mroonga System Variables

 

 

MyRocks System Variables

 

 

MyISAM System Variables

 

 

Spider System Variables

 

 

SSL System Variables

 

 

TokuDB System Variables

 





パス




ログ




運用



データベース

 

作成

 

create database <DB名>;

 

 

確認

 

show create database <DB名>;

 

接続

 

use <DB名>;

 

削除

 

drop database gakuyasu;

 

一覧

 

show databases;

 

ストレージエンジン

 

一覧

 

show engines;

 

テーブル

 

一覧

 

show tables;

 

定義確認

 

show create table <テーブル名>;

 

定義変更

 

NOT NULL付与

 

alter table <テーブル名> modify column <列名> <型> not null;



NOT NULL解除

 

alter table <テーブル名> modify column <列名> <型>;

 

ユーザー

 

作成

 

 

権限の確認

 

show grants for <ユーザ名>@<接続元ホスト>;

 

権限追加

 

grant <権限> on <DB名>.<テーブル名> to <ユーザ名>@<接続元ホスト>;

※本来は権限を変更すると再読み込みが必要だが、多くの場合、再読み込みしなくても自動反映される。

flush privileges; 

 

権限削除

 

revoke <権限> on <DB名>.<テーブル名> from <ユーザ名>@<接続元ホスト>;

 

一覧表示

 

select user, host from mysql.user;

その他の列は各権限の有効/無効が格納されているが、量が多いため、出力すると見にくくなる。

権限確認

 

show grants [for <ユーザ名>];

for句を省略した場合は、rootユーザが対象となる。

パスワード設定

 

set password for <ユーザ名>@<接続元>=password('<パスワード>');

パスワードなしでログインできるようにすることも可能。
以下はrootユーザがlocalhost接続の時のみパスワードなしでログインを許可する。

set password for root@localhost=password('');

 

削除

 

drop user [if exists] <ユーザ名>[@<接続元ホスト>] [, ...];

 

トラブルシューティング

 

デーモンが起動しない

 

ログが出ない


mysqld_safeやmysqldなどで、デーモンを起動しようとすると、起動せずに直ちに終了する。
ログファイルもsyslogにも一切情報が出ず、原因が不明である。

 

 

ツール

 

 

aria_chk

 

aria_dump_log

 

aria_ftdump

 

aria_pack

 

aria_read_log

 

innochecksum

 

mariabackup

 

mariadb_config


ビルド時のオプションを表示する

 

mbstream


MySQLのXtraBackup相当のバックアップを行う際に使用する

msql2mysql

 

myisamchk

 

myisam_ftdump

 

myisamlog

 

myisampack

 

my_print_defaults

 

myrocks_hotbackup

 

mysql

 

mysqlaccess


指定のユーザが指定のデータベースに対してアクセス権があるかを確認するツールである。



mysqladmin



サブコマンド

 

create databasename


Create a new database.

debug


Instruct server to write debug information to log.

drop databasename


Delete a database and all its tables.

flush-all-statistics


Flush all statistics tables

flush-all-status


Flush status and statistics.

flush-binary-log


Flush binary log.

flush-client-statistics


Flush client statistics.

flush-engine-log


Flush engine log.

flush-error-log


Flush error log.

flush-general-log


Flush general query log.

flush-hosts


Flush all cached hosts.

flush-index-statistics


Flush index statistics.

flush-logs


Flush all logs.

flush-privileges


Reload grant tables (same as reload).

flush-relay-log


Flush relay log.

flush-slow-log


Flush slow query log.

flush-status


Clear status variables.

flush-table-statistics


Clear table statistics.

flush-tables


Flush all tables.

flush-threads


Flush the thread cache.

flush-user-resources


Flush user resources.

flush-user-statistics


Flush user statistics.

kill id,id,…


Kill mysql threads.

password new-password


Change old password to new-password. The new password can be passed on the commandline as the next argument (for example, mysqladmin password “new_password”, or, from MariaDB 10.0, can be omitted (as long as no other command follows), in which case the user will be prompted for a password. If the password contains special characters, it needs to be enclosed in quotation marks. In Windows, the quotes can only be double quotes, as single quotes are assumed to be part of the password. If the server was started with the –skip-grant-tables option, changing the password in this way will have no effect.

old-password new-password


Change old password to new-password using the old pre-MySQL 4.1 format.

ping


Check if mysqld is alive.

processlist


Show list of active threads in server, equivalent to SHOW PROCESSLIST. With –verbose, equivalent to SHOW FULL PROCESSLIST.

reload


Reload grant tables.

refresh


Flush all tables and close and open log files.

shutdown


Take server down. If connected to a local server using a Unix socket file, mysqladmin waits until the server’s process ID file has been removed to ensure that the server has stopped properly. See also SHUTDOWN.

status


簡易ステータスを表示する。詳細なステータスはextended-statusサブコマンドで表示できる。
ただし、出力項目は一致しない。

mysqladmin status

 

extended-status


詳細なステータスを表示する。簡易ステータスはstatusサブコマンドで表示できる。
ステータス一覧はこちら

start-all-slaves


Start all slaves.

start-slave


Start replication on a slave server.

stop-all-slaves


Stop all slaves.

stop-slave


Stop replication on a slave server.

variables


Prints variables available.

version


Returns version as well as status info from the server.

オプション

 

debug-check


メモリと開いているファイルの情報を表示する

mysqladmin --debug-check

 

mysqlbinlog


バイナリログ(*-binファイル)を読むために使用する。
なお、バイナリログが有効な場合のみバイナリログは出力される。

 

mysqlcheck


データの破壊の検出、その回復など、メンテナンスに使用されるツールである。

 

チェック

 

mysqlcheck <データベース名>



mysql_client_test


MariaDBの機能のテストを行う。ソースコードを自分で改修した場合でなければ通常使用しない。

 

mysql_config

 

 

mysql_convert_table_format

 

 

mysqld

 

mysqld_multi

 

mysqld_safe

 

mysqld_safe_helper

 

mysqldump


MariaDBのデータベース・テーブルのバックアップツール。
標準出力に出力するので、ファイルへリダイレクトする




使用方法



 


※データベースは事前に作成しておく。
※データベース全体をリストアする場合はデータベース名の指定は不要。
※先にテーブル作成をしておく場合はエラーを無視する-fオプションを使用してリストアする。

 

mysqldumpslow

 

mysql_find_rows

 

mysql_fix_extensions

 

mysqlhotcopy

 

mysqlimport

 

mysql_ldb

 

mysql_plugin

 

mysql_secure_installation

 

mysql_setpermission

 

mysqlshow

 

mysqlslap

 

mysqltest

 

mysql_tzinfo_to_sql

 

mysql_upgrade

 

mysql_waitpid

 

mytop

 

perror

 

replace

 

resolveip

 

resolve_stack_dump

 

sst_dump

 

tokuftdump

 

tokuft_logprint

 

wsrep_sst_common

 

wsrep_sst_mariabackup

 

wsrep_sst_mysqldump

 

wsrep_sst_rsync

 

wsrep_sst_xtrabackup

 

wsrep_sst_xtrabackup-v2



Tips


Notice: Trying to get property 'queue' of non-object in /usr/local/wordpress/wp-includes/script-loader.php on line 2876

Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/script-loader.php on line 2876