使用LIKE在MySQL中显示不同的变量?

以下是语法-

show variables where Variable_name like 'yourVariable1%' or Variable_name like 'yourVariable2%',.............N;

让我们实现以上语法以显示(多个)变量-

mysql> show variables where Variable_name like 'key%' or Variable_name like 'innodb_undo%' or Variable_name like 'innodb_log%';

输出结果

+------------------------------------+----------+
| Variable_name                      | Value    |
+------------------------------------+----------+
| innodb_log_buffer_size             | 1048576  |
| 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_spin_cpu_abs_lwm        | 80       |
| innodb_log_spin_cpu_pct_hwm        | 50       |
| innodb_log_wait_for_flush_spin_hwm | 400      |
| innodb_log_write_ahead_size        | 8192     |
| innodb_undo_directory              | .\       |
| innodb_undo_log_encrypt            | OFF      |
| innodb_undo_log_truncate           | ON       |
| innodb_undo_tablespaces            | 2        |
| key_buffer_size                    | 8388608  |
| key_cache_age_threshold            | 300      |
| key_cache_block_size               | 1024     |
| key_cache_division_limit           | 100      |
| keyring_operations                 | ON       |
+------------------------------------+----------+
19 rows in set (0.01 sec)