Did you export the database previously using MYSQL dump?
You should export and import by the same script so that it works without problems.
Also, you can use NEC solution.