2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

複数の show variables (MySQL)

Last updated at Posted at 2016-09-13

こんにちは。
MySQL で、show variables を行うには、下記のように単純ですが、

mysql> show variables like 'group_concat_max_len';
+----------------------+------------------+
| VARIABLE_NAME        |   VARIABLE_VALUE |
|----------------------+------------------|
| group_concat_max_len |           262144 |
+----------------------+------------------+

複数を一括表示するには下記のようにすれば良いようです。

mysql> set @variables = 'group_concat_max_len sort_buffer_size';
mysql> select * from performance_schema.global_variables where @variables like concat('%', variable_name, '%');

+----------------------+------------------+
| VARIABLE_NAME        |   VARIABLE_VALUE |
|----------------------+------------------|
| group_concat_max_len |           262144 |
| sort_buffer_size     |           262144 |
+----------------------+------------------+
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?