fixed mysql connection check