15. updated at 2016/01/13
MySQL 5.7.11でdefault̲password̲lifetimeの暗黙のデフ
ォルトは0になりました。それ以降のバージョンであれば
360⽇におびえる必要はありません。
⽇々の覚書: MySQL 5.7.11で
default̲password̲lifetimeのデフォルトが0になるらし
い︕
-
14/172
20. 参考URL
MySQL :: MySQL 5.7 Reference Manual :: 1.4 What Is
New in MySQL 5.7
MySQL :: MySQL 5.7 Release Notes
Complete list of new features in MySQL 5.7
中の⼈が作った「新機能完全リスト」-
MySQL 5.7の新機能完全リスト | Yakst
↑をがんばって⽇本語に訳したヤーツ-
昨⽇アップデートした-
⽇々の覚書: 5.7
19/172
23. 16桁ハッシュのパスワード #とは
対義語は41桁ハッシュ
mysql55> SELECT user, host, password FROM user WHERE user <> 'roo
t';
+--------------+------+------------------------------------------
-+
| user | host | passwor
d |
+--------------+------+------------------------------------------
-+
| new_password | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC2
9 |
| old_password | % | 378b243e220ca49
3 |
+--------------+------+------------------------------------------
-+
2 rows in set (0.00 sec)
22/172
24. MySQL 5.6へのアップグレード
ワーニングは出たけど、アップグレードはできた。
ユーザー情報としては残ってるけど、実際にログインするに
はskip̲secure̲authを駆使しないといけない。
$ /usr/mysql/5.6.23/bin/mysql_upgrade
..
Warning 1642 Pre-4.1 password hash found. It is deprecated and will be re
moved in a future release. Please upgrade it to a new format.
..
mysql56> SELECT user, host, password FROM user WHERE user <> 'root';
+--------------+------+-------------------------------------------+
| user | host | password |
+--------------+------+-------------------------------------------+
| new_password | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
| old_password | % | 378b243e220ca493 |
+--------------+------+-------------------------------------------+
2 rows in set (0.00 sec)
23/172
25. MySQL 5.7へのアップグレード
ワーニングなのは相変わらずだけど、ちゃんと移⾏されてな
い。
$ /usr/mysql/5.7.7/bin/mysql_upgrade -S /usr/mysql/5.7.7/data/mysql.sock -uroot
..
mysql_upgrade: [Warning] 1642: Pre-4.1 password hash found. It is deprecated an
d will be removed in a future release. Please upgrade it to a new format.
..
mysql57> SELECT user, host, authentication_string FROM user WHERE user <> 'root
';
+--------------+------+-------------------------------------------+
| user | host | authentication_string |
+--------------+------+-------------------------------------------+
| new_password | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
| old_password | % | NULL |
+--------------+------+-------------------------------------------+
2 rows in set (0.00 sec)
$ mysql57 -uold_password -ptest
ERROR 1524 (HY000): Plugin 'mysql_old_password' is not loaded
24/172
27. default̲password̲lifetime
mysql57> SELECT user, host, password_expired, password_last_changed, pas
sword_lifetime, account_locked FROM mysql.user WHERE user= 'yoku0825'G
*************************** 1. row ***************************
user: yoku0825
host: %
password_expired: N
password_last_changed: 1999-07-31 00:00:00
password_lifetime: NULL
account_locked: N
1 row in set (0.00 sec)
mysql57> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)
$ mysql57 -uyoku0825 -p -e "SELECT current_user()"
Enter password:
ERROR 1862 (HY000): Your password has expired. To log in you must chang
e it using a client that supports expired passwords.
26/172
33. ONLY̲FULL̲GROUP̲BY
何故MySQLは今までこんなクエリーを許していたのかよく
わからない感じのものが(valとnumが⼀意に紐づくかどうか
がDBMSには判断できないはず)
mysql56> SELECT val, num, COUNT(*) AS c FROM t1 GROUP BY val ORDE
R BY c DESC LIMIT 5;
+--------------------------------------+-----+---+
| val | num | c |
+--------------------------------------+-----+---+
| 人類はストラトス | 16 | 8 |
| 僕は友達が巨人 | 333 | 7 |
| アウトブレイクストラトス | 46 | 7 |
| さんをつけろよマスター | 39 | 7 |
| 電波女と衰退しました | 140 | 7 |
+--------------------------------------+-----+---+
5 rows in set (0.04 sec)
32/172
34. ONLY̲FULL̲GROUP̲BY
ちゃんとエラーになる。
mysql56> SET sql_mode= CONCAT_WS(',', @@sql_mode, 'ONLY_FULL_GROU
P_BY');
Query OK, 0 rows affected (0.00 sec)
mysql56> SELECT val, num, COUNT(*) AS c FROM t1 GROUP BY val ORDE
R BY c DESC LIMIT 5;
ERROR 1055 (42000): 'd1.t1.num' isn't in GROUP BY
33/172
35. ONLY̲FULL̲GROUP̲BY
今までと同じ、「何が返ってくるかわからなくてもいいよ」
を表現するためのANY̲VALUE関数が追加された。
mysql57> SELECT val, ANY_VALUE(num), COUNT(*) AS c FROM t1 GROUP BY val
ORDER BY c DESC LIMIT 5;
+--------------------------------------+----------------+---+
| val | ANY_VALUE(num) | c |
+--------------------------------------+----------------+---+
| 人類はストラトス | 16 | 8 |
| 僕は友達が巨人 | 333 | 7 |
| アウトブレイクストラトス | 46 | 7 |
| さんをつけろよマスター | 39 | 7 |
| 電波女と衰退しました | 140 | 7 |
+--------------------------------------+----------------+---+
5 rows in set (0.01 sec)
34/172
43. ERROR̲FOR̲DIVISION̲BY̲ZERO
指定時は ワーニング になってNULLが⼊る。
mysql56> SET sql_mode= CONCAT_WS(',', @@sql_mode, 'ERROR_FOR_DIVISION_BY_ZERO');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql56> INSERT INTO t2 VALUES (2/0);
Query OK, 1 row affected, 1 warning (0.01 sec)
mysql56> SHOW WARNINGS;
+---------+------+---------------+
| Level | Code | Message |
+---------+------+---------------+
| Warning | 1365 | Division by 0 |
+---------+------+---------------+
1 row in set (0.00 sec)
mysql56> SELECT * FROM t2;
+------+
| num |
+------+
| NULL |
| NULL |
+------+
2 rows in set (0.00 sec)
42/172
44. ERROR̲FOR̲DIVISION̲BY̲ZERO + strict̲mode
strict̲modeと合わせて初めてエラーになる。
mysql56> SELECT @@sql_mode;
+------------------------------------------------+
| @@sql_mode |
+------------------------------------------------+
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO |
+------------------------------------------------+
1 row in set (0.00 sec)
mysql56> INSERT INTO t2 VALUES (2/0);
ERROR 1365 (22012): Division by 0
43/172
45. NO̲AUTO̲CREATE̲USER
パスワードなしのユーザーをCREATE USERせずに直接GRANTが
ワーニングになるのはコイツのせい。
mysql56> GRANT replication slave ON *.* TO u1;
Query OK, 0 rows affected (0.00 sec)
mysql56> SET sql_mode= CONCAT_WS(',', @@sql_mode, 'NO_AUTO_CREATE_USER'
);
Query OK, 0 rows affected (0.00 sec)
mysql56> GRANT replication slave ON *.* TO u2;
ERROR 1133 (42000): Can't find any matching row in the user table
mysql56> CREATE USER u2;
Query OK, 0 rows affected (0.00 sec)
mysql56> GRANT replication slave ON *.* TO u2;
Query OK, 0 rows affected (0.00 sec)
44/172
46. sql̲modeが空でも多少の違いがあるっぽい
mysql56> CREATE TABLE t1 (num int default null, PRIMARY KEY(num)
);
Query OK, 0 rows affected (0.16 sec)
mysql57> CREATE TABLE t1 (num int default null, PRIMARY KEY(num)
);
ERROR 1171 (42000): All parts of a PRIMARY KEY must be NOT NULL;
if you need NULL in a key, use UNIQUE instead
MySQL 5.7.3 m13 does not allow DEFAULT NULL for
primary key ・ Issue #13203 ・ rails/rails
45/172
47. log̲error̲verbosity vs. log̲warnings
今までのlog̲warningsはワーニング も 出⼒するイメージ
5.6までの動作はこんな
sql̲print̲warning()の外側で判定されてるんだぜコイ
ツ。。
-
value notes some warnings other warnings errors
log-
warnings =
0
YES No Yes Yes
log-warnings
>= 1
YES Yes Yes Yes
46/172
52. テンポラリーテーブルがInnoDBに
MyISAMを使⽤した暗黙のテンポラリーテーブルがあふれた
場合
mysql57> SELECT * FROM (SELECT * FROM t1 WHERE val LIKE 'abc%') A
S t1, (SELECT * FROM t1 WHERE val LIKE 'def%') AS t2 ORDER BY t1.
num;
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_2974_
0.MYI'; try to repair it
$ tail error.log
..
2015-04-30T14:59:45.558360+09:00 87 [ERROR] /usr/mysql/5.7.7/bin/
mysqld: Incorrect key file for table '/tmp/#sql_2974_0.MYI'; try
to repair it
2015-04-30T14:59:45.573411+09:00 87 [ERROR] Got an error from unk
nown thread, /home/yoku0825/mysql-5.7.7-rc/storage/myisam/mi_writ
e.c:223
51/172
53. テンポラリーテーブルがInnoDBに
InnoDBを使⽤した暗黙のテンポラリーテーブルがあふれた
場合
mysql57> SELECT * FROM (SELECT * FROM t1 WHERE val LIKE 'abc%') AS t
1, (SELECT * FROM t1 WHERE val LIKE 'def%') AS t2 ORDER BY t1.num;
ERROR 1114 (HY000): The table '/tmp/#sql_2974_0' is full
$ tail error.log
..
2015-04-30T15:04:22.549484+09:00 87 [ERROR] InnoDB: posix_fallocate
(): Failed to preallocate data for file ./ibtmp1, desired size 671088
64 bytes. Operating system error number 28. Check that the disk is no
t full or a disk quota exceeded. Make sure the file system supports t
his function. Some operating system error numbers are described at ht
tp://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.htm
l
2015-04-30T15:04:22.590070+09:00 87 [Warning] InnoDB: 1048576 bytes s
hould have been written. Only 794624 bytes written. Retrying again t
o write the rem
52/172
60. MySQL 5.6ではこうだったのが
mysql56> SELECT user, host, password, authentication_string FROM
user WHERE user <> 'root';
+--------------+------+------------------------------------------
-+-----------------------+
| user | host | passwor
d | authentication_string |
+--------------+------+------------------------------------------
-+-----------------------+
| new_password | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC2
9 | NULL |
| old_password | % | 378b243e220ca49
3 | NULL |
+--------------+------+------------------------------------------
-+-----------------------+
2 rows in set (0.00 sec)
59/172
61. MySQL 5.7では、こう
mysql57> SELECT user, host, password, authentication_string FROM
user WHERE user <> 'root';
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
mysql57> SELECT user, host, authentication_string FROM user WHER
E user <> 'root';
+--------------+------+------------------------------------------
-+
| user | host | authentication_strin
g |
+--------------+------+------------------------------------------
-+
| new_password | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC2
9 |
| old_password | % | NUL
L |
+--------------+------+------------------------------------------
-+
2 rows in set (0.03 sec)
60/172
63. SET PASSWORD= PASSWORD('..')が非推奨
mysql57> SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected, 1 warning (0.04 sec)
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: 'SET PASSWORD = PASSWORD('<plaintext_password>')' is dep
recated and will be removed in a future release. Please use SET P
ASSWORD = '<plaintext_password>' instead
1 row in set (0.00 sec)
mysql57> SET PASSWORD = 'root';
Query OK, 0 rows affected (0.00 sec)
62/172
65. SHOW GRANTSの出⼒結果からパスワードハッシュが取り除
かれた
mysql56> SHOW GRANTS FOR yoku0825G
*************************** 1. row ***************************
Grants for yoku0825@%: GRANT USAGE ON *.* TO 'yoku0825'@'%' IDENT
IFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29'
1 row in set (0.00 sec)
mysql57> SHOW GRANTS FOR yoku0825G
*************************** 1. row ***************************
Grants for yoku0825@%: GRANT USAGE ON *.* TO 'yoku0825'@'%'
1 row in set (0.00 sec)
64/172
67. CREATE USERせずにいきなりGRANTを叩くとワーニングまた
はエラー
mysql57> GRANT USAGE ON *.* TO new_user;
ERROR 1133 (42000): Can't find any matching row in the user table
mysql57> GRANT USAGE ON *.* TO new_user IDENTIFIED BY 'test';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql57> SHOW WARNINGSG
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: Using GRANT statement to modify existing user's properties othe
r than privileges is deprecated and will be removed in future release. U
se ALTER USER statement for this operation.
1 row in set (0.00 sec)
66/172
69. IDENTIFIED BY PASSWORD '..'構⽂の非推奨
mysql57> CREATE USER new_user IDENTIFIED BY PASSWORD '*94BDCEBE19
083CE2A1F959FD02F964C7AF4CFC29';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql57> SHOW WARNINGSG
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: 'IDENTIFIED BY PASSWORD' is deprecated and will be remov
ed in a future release. Please use IDENTIFIED WITH <plugin> AS <h
ash> instead
1 row in set (0.00 sec)
mysql57> CREATE USER new_user IDENTIFIED WITH mysql_native_passwo
rd AS '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
Query OK, 0 rows affected (0.00 sec)
68/172
71. ALTER USERステートメント
mysql57> GRANT USAGE ON *.* TO yoku0826 WITH MAX_USER_CONNECTION
S 10;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql57> SHOW WARNINGSG
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: Using GRANT statement to modify existing user's properti
es other than privileges is deprecated and will be removed in fut
ure release. Use ALTER USER statement for this operation.
1 row in set (0.00 sec)
mysql57> ALTER USER yoku0827 WITH MAX_USER_CONNECTIONS 10;
Query OK, 0 rows affected (0.00 sec)
70/172
73. secure̲file̲privの動作⾃体は変わっていない
mysql56> SELECT @@global.secure_file_priv;
+--------------------+
| @@secure_file_priv |
+--------------------+
| /tmp/ |
+--------------------+
1 row in set (0.00 sec)
mysql56> SELECT 1 INTO OUTFILE '/home/mysql/test.txt';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-p
riv option so it cannot execute this statement
mysql56> SELECT LOAD_FILE('/etc/hosts');
+-------------------------+
| LOAD_FILE('/etc/hosts') |
+-------------------------+
| NULL |
+-------------------------+
1 row in set (0.02 sec)
72/172
75. secure̲file̲priv未設定のワーニング
2015-02-17T07:09:49.446585Z 0 [Warning] Insecure configuration fo
r --secure-file-priv: Current value does not restrict location o
f generated files. Consider setting it to a valid, non-empty pat
h.
MySQL :: MySQL 5.7 Reference Manual :: 5.1.3 Server
Command Options
74/172
76. log̲timestamps
デフォルトではスローログ, エラーログ, ジェネラルログの
タイムスタンプがUTC になってしまう。
暗黙のデフォルトはUTC。”UTC”または”SYSTEM”のどちら
かしか取れない。
SET GLOBAL log_timestamps= SYSTEM; でオンライン変更
も可能。
-
my.cnfの[mysqld]セクションにlog_timestamps= SYSTEM
推奨。
-
バイナリーログは影響を受けない。
MySQL :: MySQL 5.7 Reference Manual :: 5.1.4 Server
System Variables
75/172
77. log̲timestamps
たとえばスローログ
$ tail data/slow.log
..
# Time: 2015-03-09T05:01:02.714121Z
# User@Host: root[root] @ localhost [] Id: 14
# Query_time: 0.000633 Lock_time: 0.000215 Rows_sent: 0 Rows_ex
amined: 0
SET timestamp=1425877262;
INSERT INTO t1 SELECT * FROM t1 ORDER BY RAND() LIMIT 1;
76/172
78. log̲timestamps
log_timestamps= SYSTEMすると+09:00がオフセットとして
追加される。
$ tail data/slow.log
..
# Time: 2015-03-09T14:03:16.607072+09:00
# User@Host: root[root] @ localhost [] Id: 14
# Query_time: 0.000671 Lock_time: 0.000226 Rows_sent: 0 Rows_ex
amined: 0
SET timestamp=1425877396;
INSERT INTO t1 SELECT * FROM t1 ORDER BY RAND() LIMIT 1;
77/172
82. mysql̲install̲db
$ mysql_install_db --datadir=./
2015-09-29 20:10:13 [WARNING] mysql_install_db is deprecated. Ple
ase consider switching to mysqld --initialize
2015-09-29 20:10:17 [WARNING] The bootstrap log isn't empty:
2015-09-29 20:10:17 [WARNING] mysqld: [Warning] --bootstrap is de
precated. Please consider using --initialize instead
OpenSSL 1.0.1e-fips 11 Feb 2013
server-cert.pem: OK
client-cert.pem: OK
81/172
85. mysqld –initialize
$ bin/mysqld --initialize
..
2015-02-17T02:07:18.782831Z 1 [Note] Creating the system database
2015-02-17T02:07:18.782984Z 1 [Warning] A temporary password is g
enerated for root@localhost: wokeG8n=Joia
2015-02-17T02:07:18.783207Z 1 [Note] Creating the system tables
..
84/172
88. binlog̲format= STATEMENT
$ mysqlbinlog bin.000002
# at 294
#150929 20:12:51 server id 1 end_log_pos 396 CRC32 0x3fcab02a
Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1443525171/*!*/;
INSERT INTO t1 VALUES (1, 'one')
/*!*/;
..
# at 567
#150929 20:12:56 server id 1 end_log_pos 665 CRC32 0x5d3a9895
Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1443525176/*!*/;
DELETE FROM t1 WHERE num = 1
/*!*/;
87/172
89. binlog̲format= ROW
$ mysqlbinlog -vv bin.000003
# at 289
p: `d1`.`t1` mapped to number 108
# at 335
ws: table id 108 flags: STMT_END_F
BINLOG '
QnIKVhMBAAAALgAAAE8BAAAAAGwAAAAAAAEAAmQxAAJ0MQACCA8CIAACPJfzhg==
QnIKVh4BAAAAMAAAAH8BAAAAAGwAAAAAAAEAAgAC//wBAAAAAAAAAANvbmVriXRQ
'/*!*/;
### INSERT INTO `d1`.`t1`
### SET
### @1=1 /* LONGINT meta=0 nullable=0 is_null=0 */
### @2='one' /* VARSTRING(32) meta=32 nullable=1 is_null=0 */
# at 549
p: `d1`.`t1` mapped to number 108
# at 595
ows: table id 108 flags: STMT_END_F
BINLOG '
RHIKVhMBAAAALgAAAFMCAAAAAGwAAAAAAAEAAmQxAAJ0MQACCA8CIAACi6wgiw==
RHIKViABAAAAMAAAAIMCAAAAAGwAAAAAAAEAAgAC//wBAAAAAAAAAANvbmVo4g21
'/*!*/;
### DELETE FROM `d1`.`t1`
### WHERE
### @1=1 /* LONGINT meta=0 nullable=0 is_null=0 */
### @2='one' /* VARSTRING(32) meta=32 nullable=1 is_null=0 */
88/172
91. validate̲passwordプラグイン
mysql> SHOW VARIABLES LIKE 'validate%';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo
re executing this statement.
mysql> SET PASSWORD= 'unsafe_password';
ERROR 1819 (HY000): Your password does not satisfy the current policy requiremen
ts
mysql> SET PASSWORD= 'Do_you_love_MySQL57?';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW VARIABLES LIKE 'validate%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password_dictionary_file | |
| validate_password_length | 8 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 1 |
| validate_password_policy | MEDIUM |
| validate_password_special_char_count | 1 |
+--------------------------------------+--------+
6 rows in set, 1 warning (0.00 sec)
90/172
112. GTIDのオンライン有効化
slave> SET GLOBAL gtid_mode= OFF_PERMISSIVE;
master> SET GLOBAL gtid_mode= OFF_PERMISSIVE;
slave> SET GLOBAL gtid_mode= ON_PERMISSIVE;
master> SET GLOBAL gtid_mode= ON_PERMISSIVE;
slave> SET GLOBAL enforce_gtid_consistency= ON;
master> SET GLOBAL enforce_gtid_consistency= ON;
slave> SET GLOBAL gtid_mode= ON;
master> SET GLOBAL gtid_mode= ON;
111/172
116. MySQLネイティブの全⽂検索が⽇本語対応
Not Only InnoDB.
WITH PARSER句で利⽤するフルテキストパーサーを指定でき
る(指定⾃体は5.5からできる)
Ngram(デフォルトで有効)とMeCab(バンドルされてい
るが、⾃分でmecabrcを編集してINSTALL PLUGIN)
ざっとベンチした感じ、「MeCab」かつ「ファイルソート
が気にならないレベルの⾏数」なら使えるかと。
115/172
121. サーバーサイドステートメントタイムアウト
mysql57> SELECT /*+ MAX_EXECUTION_TIME(1000) */ * FROM t1;
ERROR 3024 (HY000): Query execution was interrupted, maximum stat
ement execution time exceeded
mysql57> SET SESSION max_execution_time= 1000;
Query OK, 0 rows affected (0.00 sec)
mysql57> SELECT * FROM t1;
ERROR 3024 (HY000): Query execution was interrupted, maximum stat
ement execution time exceeded
120/172
144. ダイナミックレプリケーションフィルター
mysql57> CHANGE REPLICATION FILTER replicate_ignore_db= (mysql, p
erformance_schema);
ERROR 3017 (HY000): This operation cannot be performed with a run
ning slave sql thread; run STOP SLAVE SQL_THREAD first
mysql57> STOP SLAVE sql_thread;
mysql57> CHANGE REPLICATION FILTER replicate_ignore_db= (mysql, p
erformance_schema);
Query OK, 0 rows affected (0.00 sec)
mysql57> START SLAVE sql_thread;
143/172
148. 1テーブルに複数トリガー設定可能
mysql57> CREATE TRIGGER before_insert_1 BEFORE INSERT ON t1 FOR
EACH ROW INSERT INTO t2 SET num = NEW.num, val = NEW.val;
Query OK, 0 rows affected (0.01 sec)
mysql57> CREATE TRIGGER before_insert_2 BEFORE INSERT ON t1 FOR
EACH ROW UPDATE t2 SET val = '残念だったな' WHERE num = NEW.nu
m;
Query OK, 0 rows affected (0.00 sec)
mysql57> INSERT INTO t1 VALUES (1, 'one');
Query OK, 1 row affected (0.00 sec)
mysql57> SELECT * FROM t2;
+-----+--------------------+
| num | val |
+-----+--------------------+
| 1 | 残念だったな |
+-----+--------------------+
1 row in set (0.00 sec)
147/172
149. mysql p ump
mysql d umpの後継を狙っているらしい。論理バックアッ
プのパラレル版。
mysqlpumpの中だけで圧縮(zlib, lz4)
--userオプションでGRANTステートメントを出⼒してくれ
たり
--watch-progressオプションがデフォルト有効
インデックスの遅延ロード(--defer-table-indexes)がデフ
ォルトで有効
まだ発展途上。これからに期待
148/172
153. オフラインモード
mysql57-root> SET GLOBAL offline_mode= 1;
Query OK, 0 rows affected (0.00 sec)
mysql57-yoku0825> show databases;
ERROR 2006 (HY000): MySQL server has gone away
$ mysql57 -uyoku0825
ERROR 3032 (HY000): The server is currently in offline mode
152/172