NOTE

1.23 MySQL Production Issue Troubleshooting

MySQL production troubleshooting can begin with active sessions and resource-heavy SQL, followed by analysis with tools such as EXPLAIN. These notes record the commands.

DatabasesCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

CPU 100%

  1. Use show processlist to list all processes. Check the running sessions to see whether any resource-consuming SQL is executing.
  2. Find the SQL with high resource consumption and kill those threads; use explain to analyze the SQL.

References

mysql: Detailed Explanation of show processlist - Zhihu

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub