string $mysqli->connect_error;
string mysqli_connect_error ( void )
Returns the last error message string from the last call to mysqli_connect().
The mysqli_connect_error() function returns the error description from the last connection error, if any.
The above examples will output:
Connect Error: Access denied for user 'fake_user'@'localhost' (using password: YES)
A string that describes the error. NULL is returned if no error occurred.