Documentation Home
MySQL 9.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 41.2Mb
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


7.9.1.2 Creating Trace Files

If themysqld server does not start or it crashes easily, you can try to create a trace file to find the problem.

To do this, you must have amysqld that has been compiled with debugging support. You can check this by executingmysqld -V. If the version number ends with-debug, it is compiled with support for trace files. (On Windows, the debugging server is namedmysqld-debug rather thanmysqld.)

Start themysqld server with a trace log in/tmp/mysqld.trace on Unix or\mysqld.trace on Windows:

$> mysqld --debug

On Windows, you should also use the--standalone flag to not startmysqld as a service. In a console window, use this command:

C:\> mysqld-debug --debug --standalone

After this, you can use themysql.exe command-line tool in a second console window to reproduce the problem. You can stop themysqld server withmysqladmin shutdown.

The trace file can becomevery large! To generate a smaller trace file, you can use debugging options something like this:

mysqld --debug=d,info,error,query,general,where:O,/tmp/mysqld.trace

This only prints information with the most interesting tags to the trace file.

If you file a bug, please add only those lines from the trace file to the bug report that indicate where something seems to go wrong. If you cannot locate the wrong place, open a bug report and upload the whole trace file to the report, so that a MySQL developer can take a look at it. For instructions, seeSection 1.6, “How to Report Bugs or Problems”.

The trace file is made with theDBUG package by Fred Fish. SeeSection 7.9.4, “The DBUG Package”.