In addition to the main plugin files, Query Monitor includes a file named db.php which gets symlinked into your wp-content directory when the plugin is activated. This special file is a WordPress dropin plugin and it allows Query Monitor to provide extended functionality such as the result count, full stack trace, and error detection for all database queries.
Occasionally the PHP process won't be able to put this symlink in place. Some common causes are:
The file permissions of the wp-content directory means it isn't writable by PHP
Another wp-content/db.php file is already in place
Files for the site were copied from elsewhere (eg. during a migration from another hosting provider) and the existing symlink no longer points to a valid location
When Query Monitor is unable to symlink its db.php file into place
Query Monitor will still work fine in this situation but you won't see extended information that makes Query Monitor much more useful.
In this situation you can create the symlink manually using one of the methods below.
If you're unable to do any of the above you should be able to use your web hosting control panel (such as Plesk or cPanel) to create the symlink. Contact your web host if you're unsure.
When an existing db.php file is already in place
The db.php file will sometimes conflict with another plugin that also uses a db.php file. Such plugins include:
W3 Total Cache
There is nothing that can be done about this. This a WordPress core limitation due to the fact that the dropin plugin file must be called db.php and placed in the wp-content directory, and only one can exist there.