How to test a MySQL connection
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.