Is there a general_log option in TiDB?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: idb中是否有general_log日志选项?

| username: Running

Is there an option similar to MySQL’s general_log to record all SQL queries for easier troubleshooting?

| username: h5n1 | Original post link

Just search and you’ll find everything.

| username: TiDBer_jYQINSnf | Original post link

There is a general log, but it needs to be executed on each node. It becomes invalid after a restart. The logs are mixed in with the TiDB logs.

set @@tidb_general_log=on
| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.