new database connection method for mysqldb