MySQL deadlock causes query resolution. Recently, when the database is being maintained, the data cannot be stored into the database during data parsing. The reason is that MySQL transactions have deadlocked. I restarted MySQL several times before. Www.2cto.com has recently discovered frequent occurrences. So find a method. SELECT * FROM nation; trx_id trx_state trx_started then trx_wait_started trx_weight then trx_query trx_operation_state then trx_tables_locked trx_lock_structs too many then trx_isolation_level too many trx_ad Too many trx_state trx_started than trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state limit trx_tables_locked trx_lock_structs limit trx_isolation_level limit trx_a Daptive_hash_latched trx_adaptive_hash_timeout www.2cto.com. Select sysdate (); AM and the start time of the transaction is AM. The display is abnormal. The thread ID (trx_mysql_thread_id) of the transaction ). Run the command: The kill thread ID database is fixed properly. View the transaction being locked SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; view the transaction waiting for the lock SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;