debugging mysql connection code