Yes I reinstalled everything, and it happened again.
It happened when I put some UTF-8 code(chinese characters) in the names, I think your code have some bug, the utf-8 code break the sql , which cleared the database.
Quote all fields value before put it into the query will fix the problem.