Rechercher dans le manuel MySQL
29.5.2 Debugging a MySQL Client
To be able to debug a MySQL client with the integrated debug
package, you should configure MySQL with
-DWITH_DEBUG=1
. See
Section 2.9.7, “MySQL Source-Configuration Options”.
Before running a client, you should set the
MYSQL_DEBUG
environment variable:
shell> MYSQL_DEBUG=d:t:O,/tmp/client.trace
shell> export MYSQL_DEBUG
This causes clients to generate a trace file in
/tmp/client.trace
.
If you have problems with your own client code, you should attempt to connect to the server and run your query using a client that is known to work. Do this by running mysql in debugging mode (assuming that you have compiled MySQL with debugging on):
shell> mysql --debug=d:t:O,/tmp/client.trace
This provides useful information in case you mail a bug report. See Section 1.7, “How to Report Bugs or Problems”.
If your client crashes at some 'legal' looking code, you should
check that your mysql.h
include file
matches your MySQL library file. A very common mistake is to use
an old mysql.h
file from an old MySQL
installation with new MySQL library.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-debugging-client.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.