install_database_errors in core/includes/install.core.inc
Checks a database connection and returns any errors.