save log to mysql