最近、MySQL5.7の形態素解析エンジンのmecabに関して辞書をカスタマイズ出来るかどうか
聞かれる事が増えた為、mecabの辞書をカスタマイズしてきちんと動作確認してみました。
結論としては、問題無くカスタマイズした辞書も利用出来るようです。
但し、MySQLのマニュアルページを見る限り、MySQL Binaryから提供されているmecab辞書の利用を推奨しているようです。

【以下、抜粋】
Installing MeCab From Source (Optional)
https://dev.mysql.com/doc/refman/5.7/en/fulltext-search-mecab.html
The mecab and mecab-ipadic packages distributed with the MySQL binary are recommended but
if you want to build mecab and mecab-ipadic from source, basic installation steps are provided below.
For additional information, refer to the MeCab documentation.

前回のmecab基本検証
http://variable.jp/2015/04/10/creating-index-with-utf8mb4-on-mecab-with-5-7-7/

基本的には、MySQLのmecab辞書は特に手を加えていないようです
MySQLのコンパイル済みTarからインストールした場合のファイル

 
[root@misc02 admin]# ls -l /usr/local/mysql/lib/mecab/dic/ipadic_utf-8
合計 51828
-rw-r--r--. 1 root mysql   262496 11月  6 23:18 char.bin
-rw-r--r--. 1 root mysql      693 11月  6 23:18 dicrc
-rw-r--r--. 1 root mysql    55910 11月  6 23:18 left-id.def
-rw-r--r--. 1 root mysql  3463716 11月  6 23:18 matrix.bin
-rw-r--r--. 1 root mysql     1477 11月  6 23:18 pos-id.def
-rw-r--r--. 1 root mysql     6241 11月  6 23:18 rewrite.def
-rw-r--r--. 1 root mysql    55910 11月  6 23:18 right-id.def
-rw-r--r--. 1 root mysql 49199027 11月  6 23:18 sys.dic
-rw-r--r--. 1 root mysql     5690 11月  6 23:18 unk.dic

MecabサイトからIPA辞書をダウンロードしてインストールした場合(手を加えていない場合)

[root@misc02 admin]# ls -l /usr/local/lib/mecab/dic/ipadic
合計 51828
-rw-r--r--. 1 root root   262496  4月  4 11:36 char.bin
-rw-r--r--. 1 root root      693  4月  4 11:36 dicrc
-rw-r--r--. 1 root root    55910  4月  4 11:36 left-id.def
-rw-r--r--. 1 root root  3463716  4月  4 11:36 matrix.bin
-rw-r--r--. 1 root root     1477  4月  4 11:36 pos-id.def
-rw-r--r--. 1 root root     6241  4月  4 11:36 rewrite.def
-rw-r--r--. 1 root root    55910  4月  4 11:36 right-id.def
-rw-r--r--. 1 root root 49199027  4月  4 11:36 sys.dic
-rw-r--r--. 1 root root     5690  4月  4 11:36 unk.dic
[root@misc02 admin]# 

ここから、実際に辞書を登録して新規ワードが追加された辞書を登録しています。
※ 事前にnkf等で辞書をUTF-8に変換していますが、ここでは説明を割愛してあります。

【辞書の追加】2つの名詞のみを登録
今回は、”日本オラクル株式会社”と”mecabプラグイン”の二つのみ登録して確認

[root@misc02 mecab]# cat user_defined_dictionary_utf8.csv 
日本オラクル株式会社,1285,1285,5078,名詞,一般,*,*,*,*,日本オラクル株式会社,ニホンオラクルカブシキガイシャ,ニホンオラクルカブシキガイシャ
mecabプラグイン,1285,1285,5699,名詞,一般,*,*,*,*,mecabプラグイン,メカブプラグイン,メカブプラグイン,和布蕪プラグイン
[root@misc02 mecab]# cp -rp user_defined_dictionary_utf8.csv mecab-ipadic-2.7.0-20070801/
[root@misc02 mecab]#

user_defined_dictionary_utf8.csvが作成した追加の辞書ファイル
2文字のみ登録しているので、2文字インデックシングされた事が以下のアウトプットから確認出来る。

[root@misc02 mecab-ipadic-2.7.0-20070801]# /usr/local/libexec/mecab/mecab-dict-index -f utf-8 -t utf-8
reading ./unk.def ... 40
emitting double-array: 100% |###########################################| 
./model.def is not found. skipped.
reading ./Adj.csv ... 27210
reading ./Adnominal.csv ... 135
reading ./Adverb.csv ... 3032
reading ./Auxil.csv ... 199
reading ./Conjunction.csv ... 171
reading ./Filler.csv ... 19
reading ./Interjection.csv ... 252
reading ./Noun.adjv.csv ... 3328
reading ./Noun.adverbal.csv ... 795
reading ./Noun.csv ... 60477
reading ./Noun.demonst.csv ... 120
reading ./Noun.nai.csv ... 42
reading ./Noun.name.csv ... 34202
reading ./Noun.number.csv ... 42
reading ./Noun.org.csv ... 16668
reading ./Noun.others.csv ... 151
reading ./Noun.place.csv ... 72999
reading ./Noun.proper.csv ... 27327
reading ./Noun.verbal.csv ... 12146
reading ./Others.csv ... 2
reading ./Postp-col.csv ... 91
reading ./Postp.csv ... 146
reading ./Prefix.csv ... 221
reading ./Suffix.csv ... 1393
reading ./Symbol.csv ... 208
reading ./Verb.csv ... 130750
reading ./user_defined_dictionary_utf8.csv ... 2
emitting double-array: 100% |###########################################| 
reading ./matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################| 

done!
[root@misc02 mecab-ipadic-2.7.0-20070801]# make install
make[1]: ディレクトリ `/home/admin/mecab/mecab-ipadic-2.7.0-20070801' に入ります
make[1]: `install-exec-am' に対して行うべき事はありません.
/bin/sh ./mkinstalldirs /usr/local/lib/mecab/dic/ipadic
 /bin/install -c -m 644 ./matrix.bin /usr/local/lib/mecab/dic/ipadic/matrix.bin
 /bin/install -c -m 644 ./char.bin /usr/local/lib/mecab/dic/ipadic/char.bin
 /bin/install -c -m 644 ./sys.dic /usr/local/lib/mecab/dic/ipadic/sys.dic
 /bin/install -c -m 644 ./unk.dic /usr/local/lib/mecab/dic/ipadic/unk.dic
 /bin/install -c -m 644 ./left-id.def /usr/local/lib/mecab/dic/ipadic/left-id.def
 /bin/install -c -m 644 ./right-id.def /usr/local/lib/mecab/dic/ipadic/right-id.def
 /bin/install -c -m 644 ./rewrite.def /usr/local/lib/mecab/dic/ipadic/rewrite.def
 /bin/install -c -m 644 ./pos-id.def /usr/local/lib/mecab/dic/ipadic/pos-id.def
 /bin/install -c -m 644 ./dicrc /usr/local/lib/mecab/dic/ipadic/dicrc
make[1]: ディレクトリ `/home/admin/mecab/mecab-ipadic-2.7.0-20070801' から出ます
[root@misc02 mecab-ipadic-2.7.0-20070801]# 

mecab辞書を追加前
辞書追加前は、文字が分割されて辞書登録されている

[root@misc02 mecab-ipadic-2.7.0-20070801]# echo '日本オラクル株式会社' | /usr/local/bin/mecab
日本    名詞,固有名詞,地域,国,*,*,日本,ニッポン,ニッポン
オラクル        名詞,一般,*,*,*,*,*
株式会社        名詞,一般,*,*,*,*,株式会社,カブシキガイシャ,カブシキガイシャ
EOS
[root@misc02 mecab-ipadic-2.7.0-20070801]# 

[root@misc02 mecab-ipadic-2.7.0-20070801]# echo 'mecabプラグイン' | /usr/local/bin/mecab
mecab   名詞,固有名詞,組織,*,*,*,*
プラグ  名詞,一般,*,*,*,*,プラグ,プラグ,プラグ
イン    名詞,一般,*,*,*,*,イン,イン,イン
EOS
[root@misc02 mecab-ipadic-2.7.0-20070801]# 

mecab辞書を追加後
きちんと追加したWORDが1つの単語として認識されている事が分かる

[root@misc02 mecab]# echo '日本オラクル株式会社' | /usr/local/bin/mecab
日本オラクル株式会社    名詞,一般,*,*,*,*,日本オラクル株式会社,ニホンオラクルカブシキガイシャ,ニホンオラクルカブシキガイシャ
EOS
[root@misc02 mecab]# echo 'mecabプラグイン' | /usr/local/bin/mecab
mecabプラグイン 名詞,一般,*,*,*,*,mecabプラグイン,メカブプラグイン,メカブプラグイン,和布蕪プラグイン
EOS
[root@misc02 mecab]# 

検索対象文字列
Server1とServer2で同じデータを登録してIndexingしてあります。
また、mecab辞書はmy.cnfで新規作成したmecab辞書を参照するように設定済み。

root@localhost [mecab]> select description from articles where description like '%mecab%';
+-------------------------------------------------------------------------+
| description                                                             |
+-------------------------------------------------------------------------+
| MySQL mecabプラグインの辞書を追加した場合の動作確認                     |
| MySQL mecab                                                             |
+-------------------------------------------------------------------------+
2 rows in set (0.00 sec)

root@localhost [mecab]> select description from articles where description like '%日本%';
+---------------------------------------------------------------------------+
| description                                                               |
+---------------------------------------------------------------------------+
| 日本オラクル株式会社 辞書を追加した場合の動作確認                         |
| 日本オラクル                                                              |
+---------------------------------------------------------------------------+
2 rows in set (0.00 sec)

root@localhost [mecab]> 

オリジナルのmecab辞書
新規登録した単語では認識されていない。オリジナル辞書にあるmecabや日本と言った辞書で確認出来ている。

root@localhost [mecab]> OPTIMIZE TABLE articles;
+----------------+----------+----------+----------+
| Table          | Op       | Msg_type | Msg_text |
+----------------+----------+----------+----------+
| mecab.articles | optimize | status   | OK       |
+----------------+----------+----------+----------+
1 row in set (0.01 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like 'meca%';
+-------+-----------+--------+----------+
| word  | doc_count | doc_id | position |
+-------+-----------+--------+----------+
| mecab |         1 |     33 |        5 |
| mecab |         1 |     35 |        5 |
+-------+-----------+--------+----------+
2 rows in set (0.00 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like 'mecabプラグイン';
Empty set (0.01 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like '日本%';
+--------+-----------+--------+----------+
| word   | doc_count | doc_id | position |
+--------+-----------+--------+----------+
| 日本   |         1 |     34 |        0 |
| 日本   |         1 |     36 |        0 |
+--------+-----------+--------+----------+
2 rows in set (0.00 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like '日本オラクル%';
Empty set (0.01 sec)

root@localhost [mecab]> 
 

WORDを追加したmecab辞書
追加で単語が登録されているので、追加登録した辞書で文字列が検索出来ている。
サービスのニーズや流行りの言葉を登録させておく事により、ビジネスのニーズに柔軟に対応出来そうです。
大規模なサービスはSolr等の方が良いかもしれませんが、小規模~中規模のサービスには使えそうです。

root@localhost [mecab]> OPTIMIZE TABLE articles;
+----------------+----------+----------+----------+
| Table          | Op       | Msg_type | Msg_text |
+----------------+----------+----------+----------+
| mecab.articles | optimize | status   | OK       |
+----------------+----------+----------+----------+
1 row in set (0.01 sec)

root@localhost [mecab]>  SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like 'meca%';
+----------------------+-----------+--------+----------+
| word                 | doc_count | doc_id | position |
+----------------------+-----------+--------+----------+
| mecab                |         1 |     20 |        5 |
| mecabプラグイン      |         1 |     18 |        5 |
+----------------------+-----------+--------+----------+
2 rows in set (0.01 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like 'mecabプラグイン';
+----------------------+-----------+--------+----------+
| word                 | doc_count | doc_id | position |
+----------------------+-----------+--------+----------+
| mecabプラグイン      |         1 |     18 |        5 |
+----------------------+-----------+--------+----------+
1 row in set (0.00 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like '日本%';
+--------------------------------+-----------+--------+----------+
| word                           | doc_count | doc_id | position |
+--------------------------------+-----------+--------+----------+
| 日本                           |         1 |     21 |        0 |
| 日本オラクル株式会社           |         1 |     19 |        0 |
+--------------------------------+-----------+--------+----------+
2 rows in set (0.01 sec)

root@localhost [mecab]> SELECT word, doc_count, doc_id, position FROM information_schema.INNODB_FT_INDEX_TABLE where word like '日本オラクル%';
+--------------------------------+-----------+--------+----------+
| word                           | doc_count | doc_id | position |
+--------------------------------+-----------+--------+----------+
| 日本オラクル株式会社           |         1 |     19 |        0 |
+--------------------------------+-----------+--------+----------+
1 row in set (0.01 sec)

root@localhost [mecab]> 

search_output

参考:
12.9.9 MeCab Full-Text Parser Plugin
MeCab: Yet Another Part-of-Speech and Morphological Analyzer
単語の追加方法


【再確認】GTIDを利用したMySQL Replicationにおけるスレーブの追加

新規Slaveのoption fileに以下の設定を追加

# Binary logging and Replication
gtid-mode                      = on
enforce-gtid-consistency       = on
server_id                      = 3
log_bin                        = mysql-bin
log-slave-updates

# master_info_repository        = TABLE
# relay_log_info_repository     = TABLE

#disable-gtid-unsafe-statements
#disable-gtid-unsafe-statementsは,GTIDと互換性のない一部のSQLの実行を無効にする。

GTIDを利用したSlave設定がONになっている事を確認@CentOS03

root@localhost [test]> select @@hostname;
+------------+
| @@hostname |
+------------+
| CentOS03   |
+------------+
1 row in set (0.00 sec)

root@localhost [test]> show tables;
Empty set (0.00 sec)

root@localhost [test]> 

root@localhost [test]> show variables like '%gtid%';
+---------------------------------+-----------+
| Variable_name                   | Value     |
+---------------------------------+-----------+
| enforce_gtid_consistency        | ON        |
| gtid_executed                   |           |
| gtid_mode                       | ON        |
| gtid_next                       | AUTOMATIC |
| gtid_owned                      |           |
| gtid_purged                     |           |
| simplified_binlog_gtid_recovery | OFF       |
+---------------------------------+-----------+
7 rows in set (0.00 sec)

Master側にてデータを取得してデータ作成(スレーブでもOK、また特定DBのみでも問題なければOK)

----------------
[admin@CentOS01 ~]$ /usr/local/mysql/bin/mysqldump -uroot -p --all-databases --single-transaction --triggers --routines --events > GTID_fulldump.sql
Enter password: 
[admin@CentOS01 ~]$ scp  GTID_fulldump.sql admin@192.168.56.112:/home/admin/
admin@192.168.56.112's password: 
GTID_fulldump.sql                                                                                                            100% 4456KB   4.4MB/s   00:00    
[admin@CentOS01 ~]$ 

SlaveにてデータのリストアとReplicationの開始

[admin@CentOS03 ~]$ /usr/local/mysql/bin/mysql -u root -p < GTID_fulldump.sql 
Enter password: 
[admin@CentOS03 ~]$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.6.22-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

root@localhost [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

root@localhost [mysql]> change master to
    -> master_host = '192.168.56.101',
    -> master_port=3306,
    -> master_user='GTID_USER',
    -> master_password='password',
    -> master_auto_position=1;
Query OK, 0 rows affected, 2 warnings (0.18 sec)

root@localhost [mysql]> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: 
                  Master_Host: 192.168.56.101
                  Master_User: GTID_USER
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: 
          Read_Master_Log_Pos: 4
               Relay_Log_File: CentOS03-relay-bin.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File: 
             Slave_IO_Running: No
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 0
              Relay_Log_Space: 151
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 1
                  Master_UUID: 3edaa0b8-3e39-11e4-9df1-080027f5bf08
             Master_Info_File: /usr/local/mysql/data/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: 
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-204
                Auto_Position: 1
1 row in set (0.00 sec)

root@localhost [mysql]> start slave;
Query OK, 0 rows affected (0.04 sec)

root@localhost [mysql]> SELECT @@global.gtid_executed;
+--------------------------------------------+
| @@global.gtid_executed                     |
+--------------------------------------------+
| 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-204 |
+--------------------------------------------+
1 row in set (0.00 sec)

root@localhost [mysql]> 

Initial

Masterでの変更が反映される確認(Table作成)

root@localhost [test]>select @@hostname;
+------------+
| @@hostname |
+------------+
| CentOS01   |
+------------+
1 row in set (0.00 sec)

root@localhost [test]>CREATE TABLE `Repli_Demo` (
    ->   `id` int(20) NOT NULL AUTO_INCREMENT,
    ->   `event` varchar(256) NOT NULL DEFAULT '',
    ->   `description` varchar(256) NOT NULL DEFAULT '',
    ->   PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
Query OK, 0 rows affected (0.10 sec)

root@localhost [test]>show tables;
+----------------+
| Tables_in_test |
+----------------+
| Customer_Data  |
| MyISAM_InnoDB  |
| Personal_Info  |
| Personal_Info0 |
| Personal_Info1 |
| Personal_Info2 |
| Repli_Demo     |
| employee_table |
| ex_timestamp   |
| performance    |
+----------------+
10 rows in set (0.00 sec)

root@localhost [test]>

既存Slave

root@localhost [test]> select @@hostname;
+------------+
| @@hostname |
+------------+
| CentOS02   |
+------------+
1 row in set (0.00 sec)

root@localhost [test]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| BR_TEST        |
| Customer_Data  |
| MyISAM_InnoDB  |
| Personal_Info  |
| Personal_Info0 |
| Personal_Info1 |
| Personal_Info2 |
| Repli_Demo     |
| employee_table |
| ex_timestamp   |
| performance    |
+----------------+
11 rows in set (0.00 sec)

root@localhost [test]> 

新規追加Slave

root@localhost [test]> select @@hostname;
+------------+
| @@hostname |
+------------+
| CentOS03   |
+------------+
1 row in set (0.00 sec)

root@localhost [test]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| Customer_Data  |
| MyISAM_InnoDB  |
| Personal_Info  |
| Personal_Info0 |
| Personal_Info1 |
| Personal_Info2 |
| Repli_Demo     |
| employee_table |
| ex_timestamp   |
| performance    |
+----------------+
10 rows in set (0.00 sec)

root@localhost [test]> 

マスターにてデータ変更

root@localhost [test]>desc Repli_Demo;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(20)      | NO   | PRI | NULL    | auto_increment |
| event       | varchar(256) | NO   |     |         |                |
| description | varchar(256) | NO   |     |         |                |
+-------------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)

root@localhost [test]>insert into Repli_Demo(event,description) values('Seminor 20150116','Repli Seminor for beginner');
Query OK, 1 row affected (0.16 sec)

root@localhost [test]>show master status;
+------------------+----------+--------------+------------------+--------------------------------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set                          |
+------------------+----------+--------------+------------------+--------------------------------------------+
| mysql-bin.000256 |     1536 |              |                  | 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-209 |
+------------------+----------+--------------+------------------+--------------------------------------------+
1 row in set (0.00 sec)

root@localhost [test]>

既存Slave

root@localhost [test]> select * from Repli_Demo;
+----+------------------+----------------------------+
| id | event            | description                |
+----+------------------+----------------------------+
|  1 | Seminor 20150116 | Repli Seminor for beginner |
+----+------------------+----------------------------+
1 row in set (0.00 sec)

root@localhost [test]> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.56.101
                  Master_User: GTID_SSL_USER
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000256
          Read_Master_Log_Pos: 1536
               Relay_Log_File: CentOS02-relay-bin.000111
                Relay_Log_Pos: 1746
        Relay_Master_Log_File: mysql-bin.000256
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 1536
              Relay_Log_Space: 2350
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: Yes
           Master_SSL_CA_File: /usr/local/mysql/ssl/sql-ssl-cert.pem
           Master_SSL_CA_Path: /usr/local/mysql/ssl/
              Master_SSL_Cert: /usr/local/mysql/ssl/sql-gtid-cert.pem
            Master_SSL_Cipher: 
               Master_SSL_Key: /usr/local/mysql/ssl/sql-ssl-repl-key.pem
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 1
                  Master_UUID: 3edaa0b8-3e39-11e4-9df1-080027f5bf08
             Master_Info_File: /usr/local/mysql-advanced-5.6.21-linux-glibc2.5-x86_64/data/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 3edaa0b8-3e39-11e4-9df1-080027f5bf08:122-209
            Executed_Gtid_Set: 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-209,
cf80b01f-364f-11e4-aa59-0800270e2d1e:1-11
                Auto_Position: 1
1 row in set (0.00 sec)

root@localhost [test]> 

新規追加Slave

root@localhost [test]> select * from Repli_Demo;
+----+------------------+----------------------------+
| id | event            | description                |
+----+------------------+----------------------------+
|  1 | Seminor 20150116 | Repli Seminor for beginner |
+----+------------------+----------------------------+
1 row in set (0.00 sec)

root@localhost [test]> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.56.101
                  Master_User: GTID_USER
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000256
          Read_Master_Log_Pos: 1536
               Relay_Log_File: CentOS03-relay-bin.000002
                Relay_Log_Pos: 1706
        Relay_Master_Log_File: mysql-bin.000256
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 1536
              Relay_Log_Space: 1913
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 1
                  Master_UUID: 3edaa0b8-3e39-11e4-9df1-080027f5bf08
             Master_Info_File: /usr/local/mysql/data/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 3edaa0b8-3e39-11e4-9df1-080027f5bf08:205-209
            Executed_Gtid_Set: 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-209
                Auto_Position: 1
1 row in set (0.00 sec)

root@localhost [test]> 

データ追加
final
GTIDの確認
final-2
Binary Logの確認
GTID
Binary Log確認時のGTID確認
GTID-Confirm

ここら辺は、Enterprise版のMySQL Enterprise Monitorでレプリケーションを統合監視しても良いかもしれません。

その他:メモ
—————————————————————————————————-
以前のReplicationの設定が残っていてエラーになる場合の対応  ERROR 1840 (HY000)
—————————————————————————————————-


[admin@CentOS03 ~]$ /usr/local/mysql/bin/mysql -u root -p < GTID_fulldump.sql Enter password: ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. [admin@CentOS03 ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.6.22-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> SELECT @@global.gtid_executed;
+——————————————–+
| @@global.gtid_executed |
+——————————————–+
| 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-204 |
+——————————————–+
1 row in set (0.00 sec)

root@localhost [(none)]> SHOW GLOBAL VARIABLES LIKE ‘%GTID%’;
+———————————+——————————————–+
| Variable_name | Value |
+———————————+——————————————–+
| enforce_gtid_consistency | ON |
| gtid_executed | 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-204 |
| gtid_mode | ON |
| gtid_owned | |
| gtid_purged | 3edaa0b8-3e39-11e4-9df1-080027f5bf08:1-203 |
| simplified_binlog_gtid_recovery | OFF |
+———————————+——————————————–+
6 rows in set (0.00 sec)

root@localhost [(none)]> RESET MASTER;
Query OK, 0 rows affected (0.03 sec)

root@localhost [(none)]> SHOW GLOBAL VARIABLES LIKE ‘%GTID%’;
+———————————+——-+
| Variable_name | Value |
+———————————+——-+
| enforce_gtid_consistency | ON |
| gtid_executed | |
| gtid_mode | ON |
| gtid_owned | |
| gtid_purged | |
| simplified_binlog_gtid_recovery | OFF |
+———————————+——-+
6 rows in set (0.00 sec)

root@localhost [(none)]> exit
Bye
[admin@CentOS03 ~]$ /usr/local/mysql/bin/mysql -u root -p < GTID_fulldump.sql Enter password: [/SQL] GTIDを利用するにあたり、読んでおいた方が良さそうなページ http://nippondanji.blogspot.jp/2014/12/mysqlgtid.html
http://yakst.com/ja/posts/896
http://www.percona.com/live/mysql-conference-2014/sites/default/files/slides/FacebookGTIDPerconaLive2014.pdf