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.2.2, “The Error Log”).
If the failure is related to a
deadlock, run with the
innodb_print_all_deadlocks
option enabled so that details about each
InnoDB deadlock are printed to the MySQL
server error log.
Issues relating to the InnoDB data
dictionary include failed CREATE
TABLE statements (orphaned table files), inability
to open .InnoDB files, and
system cannot find the path specified
errors. For information about these sorts of problems and
errors, see
Section 14.2.4.7, “Troubleshooting InnoDB Data Dictionary Operations”.
When troubleshooting, it is usually best to run the MySQL
server from the command prompt, rather than through
mysqld_safe or as a Windows service. You
can then see what mysqld prints to the
console, and so have a better grasp of what is going on. On
Windows, start mysqld with the
--console option to direct
the output to the console window.
Use the InnoDB Monitors to obtain
information about a problem (see
Section 14.2.4.4, “SHOW ENGINE INNODB
STATUS and the InnoDB Monitors”). If the problem is
performance-related, or your server appears to be hung, use
the standard Monitor to print information about the internal
state of InnoDB. If the problem is with
locks, use the Lock Monitor. If the problem is in creation
of tables or other data dictionary operations, use the Table
Monitor to print the contents of the
InnoDB internal data dictionary. To see
tablespace information use the Tablespace Monitor.
If you suspect that a table is corrupt, run
CHECK TABLE on that table.
The troubleshooting steps for InnoDB I/O
problems depend on when the problem occurs: during startup of
the MySQL server, or during normal operations when a DML or
DDL statement fails due to problems at the file system level.
If something goes wrong when InnoDB
attempts to initialize its tablespace or its log files, delete
all files created by InnoDB: all
ibdata files and all
ib_logfile files. If you already created
some InnoDB tables, also delete the
corresponding .frm files for these
tables, and any .ibd files if you are
using multiple tablespaces, from the MySQL database
directories. Then try the InnoDB database
creation again. For easiest troubleshooting, start the MySQL
server from a command prompt so that you see what is
happening.
If InnoDB prints an operating system error
during a file operation, usually the problem has one of the
following solutions:
Make sure the InnoDB data file
directory and the InnoDB log directory
exist.
Make sure mysqld has access rights to create files in those directories.
Make sure mysqld can read the proper
my.cnf or my.ini
option file, so that it starts with the options that you
specified.
Make sure the disk is not full and you are not exceeding any disk quota.
Make sure that the names you specify for subdirectories and data files do not clash.
Doublecheck the syntax of the
innodb_data_home_dir and
innodb_data_file_path
values. In particular, any MAX value in
the innodb_data_file_path
option is a hard limit, and exceeding that limit causes a
fatal error.

User Comments
Add your own comment.