GNU Info

Info Node: (mysql.info)Debugging server

(mysql.info)Debugging server


Next: Debugging client Prev: Porting Up: Porting
Enter node , (file) or (file)node

Debugging a MySQL server
========================

If you are using some functionality that is very new in MySQL, you can
try to run `mysqld' with the `--skip-new' (which will disable all new,
potentially unsafe functionality) or with `--safe-mode' which disables
a lot of optimization that may cause problems.  Note: Crashing.

If `mysqld' doesn't want to start, you should check that you don't have
any `my.cnf' files that interfere with your setup!  You can check your
`my.cnf' arguments with `mysqld --print-defaults' and avoid using them
by starting with `mysqld --no-defaults ...'.

If `mysqld' starts to eat up CPU or memory or if it "hangs", you can
use `mysqladmin processlist status' to find out if someone is executing
a query that takes a long time.  It may be a good idea to run
`mysqladmin -i10 processlist status' in some window if you are
experiencing performance problems or problems when new clients can't
connect.

The command `mysqladmin debug' will dump some information about locks
in use, used memory and query usage to the mysql log file. This may
help solve some problems.  This command also provides some useful
information even if you haven't compiled MySQL for debugging!

If the problem is that some tables are getting slower and slower you
should try to optimize the table with `OPTIMIZE TABLE' or `myisamchk'.
Note: MySQL Database Administration. You should also check the slow
queries with `EXPLAIN'.

You should also read the OS-specific section in this manual for
problems that may be unique to your environment.  Note: Operating
System Specific Notes.

Compiling for debugging
Compiling MYSQL for debugging.
Making trace files
Creating trace files
Using gdb on mysqld
Debugging mysqld under gdb
Using stack trace
Using a stack trace
Using log files
Using log files to find cause of errors in mysqld
Reproduceable test case
Making a test case when you experience table corruption

automatically generated by info2www version 1.2.2.9