create mysql connection and queries