Manual:$wgDebugDumpSql

Details
If true, SQL statements are dumped to the $wgDebugLogFile (debug log).