原文链接: https://stackoverflow.com/questions/5441972/how-to-see-log-files-in-mysql

 

To enable error log add following

[mysqld_safe]
log_error=/var/log/mysql/mysql_error.log

[mysqld]
log_error=/var/log/mysql/mysql_error.log

To enable general query log add following

general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

To enable Slow Query Log add following

log_slow_queries       = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-05-25
  • 2021-10-25
  • 2021-07-08
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2021-07-04
  • 2021-12-06
  • 2021-08-13
  • 2021-11-11
  • 2021-06-11
相关资源
相似解决方案