##################################

查看ddl语句的日志,需要开启:

mysql> show global variables like '%innodb_print_ddl_logs%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_print_ddl_logs | OFF   |
+-----------------------+-------+
1 row in set, 1 warning (0.19 sec)

mysql> set global innodb_print_ddl_logs=1;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like '%log_error_verbosity%';
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| log_error_verbosity | 2     |
+---------------------+-------+
1 row in set, 1 warning (0.00 sec)

mysql> set global log_error_verbosity=3;
Query OK, 0 rows affected (0.00 sec)

mysql>

 

另外就是我们可以通过设置 innodb_print_ddl_logs=1 和 log_error_verbosity=3 在 MySQL 的 系统日志里面查看 DDL log。

 

 

 

 

 

 

 

 

 

 

 

 

 

#########################

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-04-24
  • 2021-06-27
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2021-11-17
  • 2021-05-19
  • 2021-06-20
  • 2021-07-25
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
相关资源
相似解决方案