GA

2013/07/10

TokuDBをCentOS 6.3(以降?)で動かしたい方へ

エラーログにこんなんが出て、どうもPluginのInitに失敗していた。

130710 10:24:52 Percona XtraDB (http://www.percona.com) 5.5.30-tokudb-7.0.1-29.3 started; log sequence number 1597945
Transparent huge pages are enabled, according to /sys/kernel/mm/redhat_transparent_hugepage/enabled
130710 10:24:52 [ERROR] Plugin 'TokuDB' init function returned error.
130710 10:24:52 [ERROR] Plugin 'TokuDB' registration as a STORAGE ENGINE failed.
130710 10:24:52 [Warning] /usr/percona/5.5.30_tokudb/bin/mysqld: unknown variable 'loose-innodb-buffer-pool-dump-at-shutdown=1
'
130710 10:24:52 [Warning] /usr/percona/5.5.30_tokudb/bin/mysqld: unknown variable 'loose-innodb-buffer-pool-load-at-startup=1'
130710 10:24:52 [ERROR] Unknown/unsupported storage engine: TokuDB
130710 10:24:52 [ERROR] Aborting

取り敢えず、

# echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled

で起動するようになった。

https://groups.google.com/forum/#!topic/tokudb-user/d3CujW353_4


transparent hugepageが何であるかは↓を読んでなんとなく心で感じることにした。

http://blog.goo.ne.jp/u1low_cheap/e/72a7c5528858debe4e34df83430c480e


取り敢えず同じところでハマった誰かに届け!

好きなスクリプト叩いて情報を持ってくるinformation_schemaプラグイン作った

別にスクリプトじゃなくて何でも動くけど。。

https://github.com/yoku0825/scripting_i_s

scripting_i_s.ccの中のI_S_SCRIPTのマクロを任意の実行ファイルに変えてやれば、そいつを実行した出力を空白セパレートでinformation_schema.scripting_i_sテーブルから参照できるようになっていたり。MySQL 5.5.32では動作確認済み。

取り敢えずこんな感じでいく。

$ cat /tmp/test.pl
#!/bin/bash
/bin/awk '{print $1, $2}' /proc/`pidof mysqld`/io >&2

mysql55> INSTALL PLUGIN scripting_i_s SONAME 'scripting_i_s.so';
Query OK, 0 rows affected (0.01 sec)

mysql55> SELECT * FROM information_schema.scripting_i_s;
+------------------------+---------+
| name                   | value   |
+------------------------+---------+
| rchar:                 | 9806796 |
| wchar:                 | 136035  |
| syscr:                 | 5898    |
| syscw:                 | 429     |
| read_bytes:            | 24576   |
| write_bytes:           | 311296  |
| cancelled_write_bytes: | 233472  |
+------------------------+---------+
7 rows in set (0.02 sec)

test.plの中身がPerlじゃないのは気にしない。

取り敢えずSuper_privが必要なようにはしてあるけど、mysqldの実行ユーザーで叩けるスクリプトは何でも叩くダメ仕様。md5をマクロでハードコードしておいて、実行都度md5判定させようとしたけれど、C力の低さで失敗し続けたので諦めた。

もうちょこちょこいじりたいなー。


【2013/07/10 15:36】
スクリプトから戻ってくる結果が1行64KiBを超えると多分セグフォる(キリ

2013/07/02

MySQL Utilitiesのmysqlusercloneを試す

先日rpmで突っ込んだMySQL Utilitiesのmysqlusercloneを試してみる。

http://dev.mysql.com/doc/workbench/en/mysqluserclone.html

やってくれることは、既存のユーザー情報をコピーして新しいユーザーを作ってくれる。
CREATE USER .. LIKE ..(こんな構文ないけど、ニュアンスで感じて下さい)みたいな感じ。

取り敢えず、--sourceでユーザーのコピー元MySQLに`ログインするためのDSN'、--destinationでユーザーのコピー先MySQLに`ログインするためのDSN'を指定する。

ドキュメントには特に書いてないけど、--sourceの暗黙のデフォルトはroot@localhost:3306、--destinationを省略すると--sourceと同じコネクションの中でGRANTを叩く。

my.cnfの[client]セクションは読んでる。他のところはよく判らない。

基本的な動作。

$ mysqluserclone --source root@localhost:/usr/mysql/5.6.12/data/mysql.sock tpcc@% tpcc2@localhost
# Source on localhost: ... connected.
# Cloning 1 users...
# Cloning tpcc@% to user tpcc2@localhost
# ...done.

/usr/mysql/5.6.12/data/mysql.sockを使ってroot@localhostでログインして、tpcc@%というユーザーの情報をコピーして、tpcc2@localhostというユーザーを作る。
ジェネラルログはこんな感じ。

$ less general.log
130702 13:00:30    17 Connect   root@localhost on
                   17 Query     SET NAMES 'latin1' COLLATE 'latin1_swedish_ci'
                   17 Query     SET @@session.autocommit = OFF
                   17 Query     SHOW VARIABLES LIKE 'READ_ONLY'
                   17 Query     COMMIT
                   17 Query     SHOW VARIABLES LIKE 'VERSION'
                   17 Query     COMMIT
                   17 Query     SELECT * FROM mysql.user WHERE user = 'tpcc' and host = '%'
                   17 Query     COMMIT
                   17 Query     SELECT * FROM mysql.user WHERE user = 'tpcc2' and host = 'localhost'
                   17 Query     COMMIT
                   17 Query     SELECT * FROM mysql.user WHERE user = 'tpcc2' and host = 'localhost'
                   17 Query     COMMIT
                   17 Query     SELECT CURRENT_USER()
                   17 Query     COMMIT
                   17 Query     SHOW GRANTS FOR 'tpcc'@'%'
                   17 Query     COMMIT
                   17 Query     SELECT * FROM mysql.user WHERE user = 'tpcc2' and host = 'localhost'
                   17 Query     COMMIT
                   17 Query     CREATE USER 'tpcc2'@'localhost'
                   17 Query     GRANT USAGE ON *.* TO 'tpcc2'@'localhost'
                   17 Query     SELECT * FROM mysql.user WHERE user = 'tpcc2' and host = 'localhost'
                   17 Query     COMMIT
                   17 Query     GRANT ALL PRIVILEGES ON `tpcc`.* TO 'tpcc2'@'localhost'

ユーザー情報。

mysql> SHOW GRANTS FOR tpcc@'%';
+-----------------------------------------------------------------------------------------------------+
| Grants for tpcc@%                                                                                   |
+-----------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'tpcc'@'%' IDENTIFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' |
| GRANT ALL PRIVILEGES ON `tpcc`.* TO 'tpcc'@'%'                                                      |
+-----------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> SHOW GRANTS FOR tpcc2@localhost;
+---------------------------------------------------------+
| Grants for tpcc2@localhost                              |
+---------------------------------------------------------+
| GRANT USAGE ON *.* TO 'tpcc2'@'localhost'               |
| GRANT ALL PRIVILEGES ON `tpcc`.* TO 'tpcc2'@'localhost' |
+---------------------------------------------------------+
2 rows in set (0.00 sec)

おっとっと。。パスワードは指定しないとコピーしてくれないのね。
黙って同じものにしてくれて良いのに(´・ω・`)


$ mysqluserclone --source root@127.0.0.1:3306 tpcc@% tpcc3:<password>@'127.0.0.1'
# Source on 127.0.0.1: ... connected.
# Cloning 1 users...
# Cloning tpcc@% to user tpcc3:test@127.0.0.1
# ...done.

$ less general.log
130702 13:05:16    21 Connect   root@localhost on
                   21 Query     SET NAMES 'latin1' COLLATE 'latin1_swedish_ci'
                   21 Query     SET @@session.autocommit = OFF
                   21 Query     SHOW VARIABLES LIKE 'READ_ONLY'
                   21 Query     COMMIT
                   21 Query     SHOW VARIABLES LIKE 'VERSION'
                   21 Query     COMMIT
                   21 Query     SELECT * FROM mysql.user WHERE user = 'tpcc' and host = '%'
                   21 Query     COMMIT
                   21 Query     SELECT * FROM mysql.user WHERE user = 'tpcc3' and host = '127.0.0.1'
                   21 Query     COMMIT
                   21 Query     SELECT * FROM mysql.user WHERE user = 'tpcc3' and host = '127.0.0.1'
                   21 Query     COMMIT
                   21 Query     SELECT CURRENT_USER()
                   21 Query     COMMIT
                   21 Query     SHOW GRANTS FOR 'tpcc'@'%'
                   21 Query     COMMIT
                   21 Query     SELECT * FROM mysql.user WHERE user = 'tpcc3' and host = '127.0.0.1'
                   21 Query     COMMIT
                   21 Query     CREATE USER 'tpcc3'@'127.0.0.1' IDENTIFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29'
                   21 Query     GRANT USAGE ON *.* TO 'tpcc3'@'127.0.0.1'
                   21 Query     SELECT * FROM mysql.user WHERE user = 'tpcc3' and host = '127.0.0.1'
                   21 Query     COMMIT
                   21 Query     GRANT ALL PRIVILEGES ON `tpcc`.* TO 'tpcc3'@'127.0.0.1'

mysql> SHOW GRANTS FOR tpcc3@127.0.0.1;
+--------------------------------------------------------------------------------------------------------------+
| Grants for tpcc3@127.0.0.1                                                                                   |
+--------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'tpcc3'@'127.0.0.1' IDENTIFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' |
| GRANT ALL PRIVILEGES ON `tpcc`.* TO 'tpcc3'@'127.0.0.1'                                                      |
+--------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

どうせもとのパスワードが分からなくてもIDENTIFIED BY PASSWORD '*..'で同じパスワードはコピーできるんだから、クローン元ユーザーと同じパスワードを設定するようなオプションが欲しいなぁ。
取り敢えずこれを使って、スキーマ名のtypoでサービスを止めかけるという惨事は二度と起こさないで済むようにしたい。。orz

ちなみに量産もできるぽい。

$ mysqluserclone --source root@127.0.0.1:3306 tpcc@% tpcc10@'127.0.0.1' tpcc11@'127.0.1.1' tpcc12@'127.0.2.1'
# Source on 127.0.0.1: ... connected.
# Cloning 3 users...
# Cloning tpcc@% to user tpcc10@127.0.0.1
# Cloning tpcc@% to user tpcc11@127.0.1.1
# Cloning tpcc@% to user tpcc12@127.0.2.1
# ...done.

ますますパスワードのコピーが欲しい。。

2013/07/01

MySQL 5.6のCHANGE MASTER TOで出るようになったワーニング

MySQL 5.5までは何も出なかったけど、MySQL 5.6で追加されたワーニング。

mysql56> CHANGE MASTER TO MASTER_HOST= 'localhost', MASTER_PORT= 64055, MASTER_USER= 'replicatior', MASTER_PASSWORD= 'xxxx', MASTER_LOG_FILE= 'bin.000001', MASTER_LOG_POS= 1;
Query OK, 0 rows affected, 2 warnings (0.06 sec)

mysql56> SHOW WARNINGS;
+-------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                                                                                                                        |
+-------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Note  | 1759 | Sending passwords in plain text without SSL/TLS is extremely insecure.                                                                                                                                         |
| Note  | 1760 | Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives. |
+-------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

shell> cat data/master.info
23
bin.000001
4
localhost
replicatior
xxxx
64055
60
0





0
1800.000

0

86400


0

1759は読んだそのまま、パスワードがSSL使わずにマスターに送信されてるぞ、というNote。

1760は、CHANGE MASTER TOでUSER_NAMEとUSER_PASSWORDを指定するとmaster.info(master_info_repository= TABLEならmysql.slave_master_info)に平文で格納されるから危ういぞ、というNote。

どうすればこれが出なくなるかというと、START SLAVEで指定するようにする。

//
mysql56> CHANGE MASTER TO MASTER_HOST= 'localhost', MASTER_PORT= 64055, MASTER_LOG_FILE= 'bin.000001', MASTER_LOG_POS= 1;
Query OK, 0 rows affected (0.04 sec)

mysql56> START SLAVE USER= 'replicator' PASSWORD= 'xxxx'; --コンマ要らなかったり、MASTER_USERじゃなかったり。
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql56> SHOW WARNINGS;
+-------+------+------------------------------------------------------------------------+
| Level | Code | Message                                                                |
+-------+------+------------------------------------------------------------------------+
| Note  | 1759 | Sending passwords in plain text without SSL/TLS is extremely insecure. |
+-------+------+------------------------------------------------------------------------+
1 row in set (0.00 sec)

shell> cat data/master.info
23
bin.000001
4
localhost


64055
60
0





0
1800.000

0

86400


0

当然、master.infoにUSERとPASSWORDを保存しなくなるので、mysqldを再起動すると

2013-07-01 19:39:46 16508 [ERROR] Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Error_code: 1593
2013-07-01 19:39:46 16508 [Note] Slave I/O thread killed while connecting to master
2013-07-01 19:39:46 16508 [Note] Slave I/O thread exiting, read up to log 'bin.000001', position 4

こうなる。

まあ、好き好きかな。。


【2013/07/01 19:49】
マニュアルへのリンク忘れてた。。
http://dev.mysql.com/doc/refman/5.6/en/start-slave.html

【2013/07/02 10:19】
このNoteわかりにくいから変えようぜ、というBugsはこちら。
http://bugs.mysql.com/bug.php?id=68602

2013/06/28

もう一度MySQL Utilitiesを試してみる(インストール編)

WEBサーバーが増設されて、MySQLのユーザーを追加しなきゃいけなかった時にCREATE USER .. LIKE ...みたいなのが使えたらなぁとか思っていたら、@RKajiyamaさんにmysqlusercloneがあるよ! と教えてもらったので試してみる。

MySQL Utilitiesはだいぶ前にmysqlfailoverを試したくて入れたっきりで、あの時はまだMySQL Workbenchにしか入っていなかった(いつだったか独立して入れられるようになった)ので、WorkbenchのソースコードからUtilitiesの部分だけインストールしたなぁとか感傷に浸りつつ、お手軽にrpmで突っ込む。

CentOS6.3だから本当は"Oracle & Red Hat Linux 6"じゃないんだけど気にしない。"Linux Generic"がないので。

$ sudo rpm -i http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-utilities-1.3.2-1.el6.noarch.rpm/from/http://cdn.mysql.com/
エラー: 依存性の欠如:
        mysql-connector-python >= 1.0.9 は mysql-utilities-1.3.2-1.el6.noarch に必要とされています

おやま。
MySQL公式のConnector/Pythonが必要で、MySQL-pythonじゃダメらしい。

$ sudo rpm -i http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-1.0.10-1.el6.noarch.rpm/fro
m/http://cdn.mysql.com/

$ sudo rpm -i http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-utilities-1.3.2-1.el6.noarch.rpm/from/http://cdn.mysql.com/

入れたら通った。うん。
取り敢えずmysqluc(MySQL Utilities Client)を起動してみる。

$ mysqluc
Launching console ...
WARNING: mysqlauditadmin failed to read options. This utility will not be shown in 'help utilities' and cannot be accessed from the console.
ERROR: The mysqlauditadmin utility requires Python version 2.7.0 or higher and lower than 3.0.0. The version of Python detected was 2.6.6. You may need to install or redirect the execution of this utility to an environment that includes a compatible Python version.

WARNING: mysqlauditgrep failed to read options. This utility will not be shown in 'help utilities' and cannot be accessed from the console.
ERROR: The mysqlauditgrep utility requires Python version 2.7.0 or higher and lower than 3.0.0. The version of Python detected was 2.6.6. You may need to install or redirect the execution of this utility to an environment that includes a compatible Python version.


Welcome to the MySQL Utilities Client (mysqluc) version 1.3.2
Copyright (c) 2000, 2013, 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' for a list of commands or press TAB twice for list of utilities.

mysqluc>

(;´д`) Python古い言われた。
sudo yum update pythonしても2.6.6のままだったのでまあいいやAudit Pluginからみのやつだけぽいし。

mysqluc> help
Command                 Description
----------------------  ---------------------------------------------------
help utilities          Display list of all utilities supported.
help <utility>          Display help for a specific utility.
help | help commands    Show this list.
exit | quit             Exit the console.
set <variable>=<value>  Store a variable for recall in commands.
show options            Display list of options specified by the user on
                        launch.
show variables          Display list of variables.
<ENTER>                 Press ENTER to execute command.
<ESCAPE>                Press ESCAPE to clear the command entry.
<DOWN>                  Press DOWN to retrieve the previous command.
<UP>                    Press UP to retrieve the next command in history.
<TAB>                   Press TAB for type completion of utility, option,
                        or variable names.
<TAB><TAB>              Press TAB twice for list of matching type
                        completion (context sensitive).
mysqluc> help utilities
Utility           Description
----------------  ---------------------------------------------------------
mysqldbcompare    compare databases for consistency
mysqldbcopy       copy databases from one server to another
mysqldbexport     export metadata and data from databases
mysqldbimport     import metadata and data from files
mysqldiff         compare object definitions among objects where the
                  difference is how db1.obj1 differs from db2.obj2
mysqldiskusage    show disk usage for databases
mysqlfailover     automatic replication health monitoring and failover
mysqlfrm          show CREATE TABLE from .frm files
mysqlindexcheck   check for duplicate or redundant indexes
mysqlmetagrep     search metadata
mysqlprocgrep     search process information
mysqlreplicate    establish replication with a master
mysqlrpladmin     administration utility for MySQL replication
mysqlrplcheck     check replication
mysqlrplshow      show slaves attached to a master
mysqlserverclone  start another instance of a running server
mysqlserverinfo   show server information
mysqluserclone    clone a MySQL user account to one or more new users

mysqluc> help mysqluserclone
Usage: mysqluserclone --source=user:pass@host:port:socket --destination=user:pass@host:port:socket joe@localhost sam:secret1@localhost

mysqluserclone - clone a MySQL user account to one or more new users

Options:
Option                       Description
---------------------------  ----------------------------------------------
--version                    show program's version number and exit
--help                       display a help message and exit
--source=SOURCE              connection information for source server in
                             the form:
                             <user>[:<password>]@<host>[:<port>][:<socket>]
                             or <login-path>[:<port>][:<socket>].
--destination=DESTINATION    connection information for destination server
                             in the form:
                             <user>[:<password>]@<host>[:<port>][:<socket>]
                             or <login-path>[:<port>][:<socket>].
-d, --dump                   dump GRANT statements for user - does not
                             require a destination
--force                      drop the new user if it exists
--include-global-privileges  include privileges that match base_user@% as
                             well as base_user@host
--list                       list all users on the source - does not
                             require a destination
-f, --format=FORMAT          display the list of users in either grid
                             (default), tab, csv, or vertical format -
                             valid only for --list option
-v, --verbose                control how much information is displayed.
                             e.g., -v = verbose, -vv = more verbose, -vvv =
                             debug
-q, --quiet                  turn off all messages for quiet execution.

mysqluc> 

このあたりはドキュメントに書いてあることやmysqluserclone --helpと一緒ね。
mysqluc立ち上げた時のバナーに書いてある通り、TABで補完が利く。

mysqluc> mysqluserclone<TAB><TAB>

Option                       Description
---------------------------  ----------------------------------------------
--version                    show program's version number and exit
--help                       display a help message and exit
--source=SOURCE              connection information for source server in
                             the form:
                             <user>[:<password>]@<host>[:<port>][:<socket>]
                             or <login-path>[:<port>][:<socket>].
--destination=DESTINATION    connection information for destination server
                             in the form:
                             <user>[:<password>]@<host>[:<port>][:<socket>]
                             or <login-path>[:<port>][:<socket>].
-d, --dump                   dump GRANT statements for user - does not
                             require a destination
--force                      drop the new user if it exists
--include-global-privileges  include privileges that match base_user@% as
                             well as base_user@host
--list                       list all users on the source - does not
                             require a destination
-f, --format=FORMAT          display the list of users in either grid
                             (default), tab, csv, or vertical format -
                             valid only for --list option
-v, --verbose                control how much information is displayed.
                             e.g., -v = verbose, -vv = more verbose, -vvv =
                             debug
-q, --quiet                  turn off all messages for quiet execution.

mysqluc> mysqluserclone --s<TAB><TAB>

Option           Description
---------------  ----------------------------------------------------------
--source=SOURCE  connection information for source server in the form:
                 <user>[:<password>]@<host>[:<port>][:<socket>] or <login-
                 path>[:<port>][:<socket>].

オプションも補完が利く&ついでにそのオプションのhelpも出してくれた。ちょっとCISCOぽい?
しかしこのmysqluc自体が誰得な感じがしないでもない…。


当初の目的のmysqlusercloneにたどり着いてないけどとりあえずここまで。
しかし、どうにもmysqltuner的な気配がするよねこいつら。。(mysqldiskusageとかmysqlserverinfoとかmysqlprocgrepとか)


【2013/07/02 13:17】
mysqluserclone試してみた。すごくフツー。
http://yoku0825.blogspot.jp/2013/07/mysql-utilitiesmysqluserclone.html

2013/06/25

手抜きでmysqlコマンドラインクライアントに色をつける

mysqlコマンドラインクライアントの表示に色をつけたくなった。
イメージとしてはこんな感じ。

$ client/mysql -S/usr/mysql/5.6.12/data/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11532
Server version: 5.6.12-log Source distribution

Copyright (c) 2000, 2013, 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.

mysql>
mysql>
mysql>
mysql> exit
Bye

mysql-5.6.12/client/mysql.ccに手抜きな感じで追加。

$ vim client/mysql.cc
..
1316   put_info("\033[1;31mWelcome to the MySQL monitor.  Commands end with ; or \\g.",
..
1429     put_info(sig ? "\033[0mAborted" : "\033[0mBye", INFO_RESULT);
..

ビバ、手抜き。

いつも忘れるSHOW SLAVE STATUSとかの権限

何度も忘れるのでいい加減メモ。

SHOW {MASTER|SLAVE} STATUSがSUPERまたはREPLICATION CLIENT、
SHOW SLAVE HOSTS, SHOW {BINLOG|RELAYLOG} EVENTSがREPLICATION SLAVE。

mysql55> SHOW MASTER STATUS;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation

mysql55> SHOW SLAVE STATUS;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation

mysql55> SHOW SLAVE HOSTS;
ERROR 1227 (42000): Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation

mysql55> SHOW BINLOG EVENTS IN 'bin.000001';
ERROR 1227 (42000): Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation

mysql55> SHOW RELAYLOG EVENTS IN 'relay.000001';
ERROR 1227 (42000): Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation

mysql55> RESET SLAVE;
ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

mysql55> RESET MASTER;
ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

本気でただのメモ。