- MySQL Native Driver Configuration Options
-
-
-
- Name
- Default
- Changeable
- Changelog
-
-
-
-
- mysqlnd.collect_statistics
- "1"
- PHP_INI_SYSTEM
- Available since PHP 5.3.0.
-
-
- mysqlnd.collect_memory_statistics
- "0"
- PHP_INI_SYSTEM
- Available since PHP 5.3.0.
-
-
-
-
- &ini.php.constants;
-
+
+ MySQL Native Driver Configuration Options
+
+
+
+ Name
+ Default
+ Changeable
+ Changelog
+
+
+
+
+ mysqlnd.collect_statistics
+ "1"
+ PHP_INI_SYSTEM
+ Available since PHP 5.3.0.
+
+
+ mysqlnd.collect_memory_statistics
+ "0"
+ PHP_INI_SYSTEM
+ Available since PHP 5.3.0.
+
+
+ mysqlnd.log_mask
+ "0"
+ PHP_INI_SYSTEM
+ Available since PHP 5.3.0.
+
+
+
+
+ &ini.php.constants;
+
&ini.descriptions.title;
-
-
-
- mysqlnd.collect_statistics
- boolean
-
-
-
- Enables the collection of various client statistics which can be
- accessed through mysqli_get_client_stats,
- mysqli_get_connection_stats,
- mysqli_get_cache_stats and are shown in
- mysqlnd section of the output of the
- phpinfo function as well.
-
-
-
- This configuration setting enables all
- MySQL Native Driver statistics
- except those relating to memory management.
-
-
-
-
-
-
- mysqlnd.collect_memory_statistics
- boolean
-
-
-
- Enable the collection of various memory statistics which can be
- accessed through mysqli_get_client_stats,
- mysqli_get_connection_stats,
- mysqli_get_cache_stats and are shown in
- mysqlnd section of the output of the
- phpinfo function as well.
-
-
-
- This configuration setting enables the memory management statistics
- within the overall set of MySQL Native
- Driver statistics.
-
-
-
-
-
-
+
+
+
+ mysqlnd.collect_statistics
+ boolean
+
+
+
+ Enables the collection of various client statistics which can be
+ accessed through mysqli_get_client_stats,
+ mysqli_get_connection_stats,
+ mysqli_get_cache_stats and are shown in
+ mysqlnd section of the output of the
+ phpinfo function as well.
+
+
+ This configuration setting enables all
+ MySQL Native Driver
+ statistics except those relating to memory management.
+
+
+
+
+
+ mysqlnd.collect_memory_statistics
+ boolean
+
+
+
+ Enable the collection of various memory statistics which can be
+ accessed through mysqli_get_client_stats,
+ mysqli_get_connection_stats,
+ mysqli_get_cache_stats and are shown in
+ mysqlnd section of the output of the
+ phpinfo function as well.
+
+
+ This configuration setting enables the memory management
+ statistics within the overall set of
+ MySQL Native Driver
+ statistics.
+
+
+
+
+
+ mysqlnd.log_maskinteger
+
+
+
+ The PHP configuration setting mysqlnd.log_mask
+ defines which queries will be logged. The default is
+ mysqlnd.log_mask = "0", which disables logging.
+
+
+ This setting can have values assigned according to the following
+ table:
+
+
+
+
+
+ SERVER_STATUS_IN_TRANS
+ 1
+
+
+ SERVER_STATUS_AUTOCOMMIT
+ 2
+
+
+ SERVER_MORE_RESULTS_EXISTS
+ 8
+
+
+ SERVER_QUERY_NO_GOOD_INDEX_USED
+ 16
+
+
+ SERVER_QUERY_NO_INDEX_USED
+ 32
+
+
+ SERVER_STATUS_CURSOR_EXISTS
+ 64
+
+
+ SERVER_STATUS_LAST_ROW_SENT
+ 128
+
+
+ SERVER_STATUS_DB_DROPPED
+ 256
+
+
+ SERVER_STATUS_NO_BACKSLASH_ESCAPES
+ 512
+
+
+ SERVER_QUERY_WAS_SLOW
+ 1024
+
+
+
+
+
+ It is possible to add the values together, to log multiple query
+ types. For example, you can set it to 16 + 32 = 48 to log slow
+ queries which either use no good index
+ (SERVER_QUERY_NO_GOOD_INDEX_USED = 16) or no index at all
+ (SERVER_QUERY_NO_INDEX_USED = 32).
+
+
+ Note, the SERVER_* constants are MySQL internal (C-level)
+ constants, not exported to the PHP userland. There are no
+ corresponding PHP constants. However, you can look up the values
+ in the table which has been created by inspecting the MySQL Native
+ Driver source.
+
+
+
+
+