fixed mysql logging