Skip to content

Instantly share code, notes, and snippets.

@js2854
Last active April 7, 2021 07:27
Show Gist options
  • Save js2854/b67637bbc88381859f2b98016f5256ec to your computer and use it in GitHub Desktop.
Save js2854/b67637bbc88381859f2b98016f5256ec to your computer and use it in GitHub Desktop.
查看mysql是否开启binlog,log_bin为ON表示开启了binlog,binlog_format为ROW表示是ROW模式,binlog_row_image为FULL
MariaDB [phone_property]> show variables like '%log_bin%';
+----------------------------------+-------+
| Variable_name | Value |
+----------------------------------+-------+
| forbid_remote_change_sql_log_bin | ON |
| log_bin | ON |
| log_bin_trust_function_creators | ON |
| sql_log_bin | ON |
+----------------------------------+-------+
4 rows in set (0.00 sec)
MariaDB [phone_property]> show variables like 'binlog%';
+-----------------------------------------+------------+
| Variable_name | Value |
+-----------------------------------------+------------+
| binlog_annotate_row_events | OFF |
| binlog_cache_size | 32768 |
| binlog_checksum | NONE |
| binlog_commit_wait_count | 0 |
| binlog_commit_wait_usec | 100000 |
| binlog_direct_non_transactional_updates | OFF |
| binlog_format | ROW |
| binlog_format_free_change | ON |
| binlog_optimize_thread_scheduling | ON |
| binlog_row_image | FULL |
| binlog_stmt_cache_size | 32768 |
| binlog_write_threshold | 1610612736 |
+-----------------------------------------+------------+
12 rows in set (0.00 sec)
MariaDB [phone_property]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment