MySQL Connection Errors

Before, when an error occured when connecting to the database, it printed the database object which is not helpful. This prints the error.