mysql connection implementation