mysql connection and first step for teacher if