How to test a MySQL connection How can I test for active MySQL connections? I am trying to move one site to windows platform, and MySQL connections are failing; db_query() returns FALSE.
I am not sure how to use drupal_test_mysqli().
The function is invoked with code similar to:

$success = array();
$url = 'mysqli://username:password@localhost/databasename';

require_once './includes/install.mysqli.inc';
$err = drupal_test_mysqli($url, $success);


Replace username, password, localhost, and databasename with the values correct for your site.
The variable $success will contain an array with a value for each SQL instruction that has been executed with success.