mysql wirting completed