Oracle 5.0 Reference Manual page 2653

Table of Contents

Advertisement

20.7.6.6.7. Debugging and Tracing
Copyright 1997-2012 the PHP Documentation Group. [2230]
The mysqlnd debug log can be used to debug and trace the actitivities of PECL/mysqlnd_ms. As a
mysqlnd PECL/mysqlnd_ms adds trace information to the mysqlnd library debug file. Please, see
the
mysqlnd.debug
configure the debug log.
Configuration setting example to activate the debug log:
mysqlnd.debug=d:t:x:O,/tmp/mysqlnd.trace
The debug log shows mysqlnd library and PECL/mysqlnd_ms plugin function calls, similar to a trace
log. Mysqlnd library calls are usually prefixed with mysqlnd_. PECL/mysqlnd internal calls begin with
mysqlnd_ms.
Example excerpt from the debug log (connect):
[...]
>mysqlnd_connect
| info : host=myapp user=root db=test port=3306 flags=131072
| >mysqlnd_ms::connect
| | >mysqlnd_ms_config_json_section_exists
| | | info : section=[myapp] len=[5]
| | | >mysqlnd_ms_config_json_sub_section_exists
| | | | info : section=[myapp] len=[5]
| | | | info : ret=1
| | | <mysqlnd_ms_config_json_sub_section_exists
| | | info : ret=1
| | <mysqlnd_ms_config_json_section_exists
[...]
The debug log is not only useful for plugin developers but also to find the cause of user errors. For
example, if your application does not do proper error handling and fails to record error messages,
checking the debug and trace log may help finding the cause. Use of the debug log to debug
application issues should be considered only if no other option is available. Writing the debug log to
disk is a slow operation and may have negative impact on the application performance.
Example excerpt from the debug log (connection failure):
[...]
| | | | | | | info : adding error [Access denied for user 'root'@'localhost' (using password: YES)] to
| | | | | | | info : PACKET_FREE(0)
| | | | | | | info : PACKET_FREE(0x7f3ef6323f50)
| | | | | | | info : PACKET_FREE(0x7f3ef6324080)
| | | | | | <mysqlnd_auth_handshake
| | | | | | info : switch_to_auth_protocol=n/a
| | | | | | info : conn->error_info.error_no = 1045
| | | | | <mysqlnd_connect_run_authentication
| | | | | info : PACKET_FREE(0x7f3ef63236d8)
| | | | | >mysqlnd_conn::free_contents
| | | | | | >mysqlnd_net::free_contents
| | | | | | <mysqlnd_net::free_contents
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
PHP configuration directive documentation for a detailed description on how to
Note
This feature is only available with a debug build of PHP. Works on Microsoft
Windows if using a debug build of PHP and PHP was built using Microsoft
Visual C version 9 and above.
2633

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents