Flush mysql output to log