## 15.21 InnoDB Troubleshooting

[15.21.1 Troubleshooting InnoDB I/O Problems](error-creating-innodb.html)
[15.21.2 Troubleshooting Recovery Failures](innodb-troubleshooting-recovery.html)
[15.21.3 Forcing InnoDB Recovery](forcing-innodb-recovery.html)
[15.21.4 Troubleshooting InnoDB Data Dictionary Operations](innodb-troubleshooting-datadict.html)
[15.21.5 InnoDB Error Handling](innodb-error-handling.html)

[]()

 The following general guidelines apply to troubleshooting `InnoDB` problems:

* When an operation fails or you suspect a bug, look at the MySQL server error log (see [Section 5.4.2, “The Error Log”](error-log.html)). [Server Error Message Reference](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html) provides troubleshooting information for some of the common `InnoDB`-specific errors that you may encounter.

* If the failure is related to a [deadlock](glossary.html#glos_deadlock), run with the [`innodb_print_all_deadlocks`](innodb-parameters.html#sysvar_innodb_print_all_deadlocks) option enabled so that details about each deadlock are printed to the MySQL server error log. For information about deadlocks, see [Section 15.7.5, “Deadlocks in InnoDB”](innodb-deadlocks.html).

* If the issue is related to the `InnoDB` data dictionary, see [Section 15.21.4, “Troubleshooting InnoDB Data Dictionary Operations”](innodb-troubleshooting-datadict.html).

* When troubleshooting, it is usually best to run the MySQL server from the command prompt, rather than through [**mysqld\_safe**](mysqld-safe.html) or as a Windows service. You can then see what [**mysqld**](mysqld.html) prints to the console, and so have a better grasp of what is going on. On Windows, start [**mysqld**](mysqld.html) with the [`--console`](server-options.html#option_mysqld_console) option to direct the output to the console window.

* []() []() Enable the `InnoDB` Monitors to obtain information about a problem (see [Section 15.17, “InnoDB Monitors”](innodb-monitors.html)). If the problem is performance-related, or your server appears to be hung, you should enable the standard Monitor to print information about the internal state of `InnoDB`. If the problem is with locks, enable the Lock Monitor. If the problem is with table creation, tablespaces, or data dictionary operations, refer to the [InnoDB Information Schema system tables](innodb-information-schema-system-tables.html) to examine contents of the `InnoDB` internal data dictionary.

  `InnoDB` temporarily enables standard `InnoDB` Monitor output under the following conditions:

  * A long semaphore wait

  * `InnoDB` cannot find free blocks in the buffer pool

  * Over 67% of the buffer pool is occupied by lock heaps or the adaptive hash index

* If you suspect that a table is corrupt, run [`CHECK TABLE`](check-table.html) on that table.

