The DBUG Package For  mysqld , it is also possible to change DBUG settings at runtime by setting the  debug  system variable. This variable has global and session values: Changing the global  debug  value requires privileges sufficient to set global system variables. Changing the session  debug  value requires privileges sufficient to set restricted session system variables. See Section 5.1.9.1, “System Variable Privileges” . The  debug_options  value is a sequence of colon-separated fields: Each field within the value consists of a mandatory flag character, optionally preceded by a  +  or  - character, and optionally followed by a comma-separated list of modifiers: The following table describes the permitted flag characters. Unrecognized flag characters are silently ignored. --debug=d:f,main,subr1:F:L:t,20 --debug=d,input,output,files:n --debug=d:t:i:O,\\mysqld.trace mysql>  SET GLOBAL debug = ’ debug_options ’; mysql>  SET SESSION debug = ’ debug_options ’; field_1:field_2:...:field_ [+|-]flag[,modifier,modifier,...,modifier] 1166 Flag Description d Enable output from DBUG_ XXX  macros for the current state. May be followed by a list of keywords, which enables output only for the DBUG macros with that keyword. An empty list of keywords enables output for all macros. In MySQL, common debug macro keywords to enable are  enter ,  exit ,  error ,  warning ,  info , and  loop . D Delay after each debugger output line. The argument is the delay, in tenths of seconds, subject to machine capabilities. For example,  D,20 specifies a delay of two seconds. f Limit debugging, tracing, and profiling to the list of named functions. An empty list enables all functions. The appropriate  d  or  t  flags must still be given; this flag only limits their actions if they are enabled. F Identify the source file name for each line of debug or trace output. i Identify the process with the PID or thread ID for each line of debug or trace output. L Identify the source file line number for each line of debug or trace output. n Print the current function nesting depth for each line of debug or trace output. N Number each line of debug output.