0

I made a mysqldump from all my databases prior to fully deinstall and reinstall MariaDB. while restoring the databases with the following command, logged in as root:

MySQL -u root -p < /mnt/backups/190612alldb.sql

I'm getting the following error:

ERROR 1006 (HY000) at line 22: Can't create database 'mydatabase' (errno: 2 "No such file or directory")

'mydatabase' is just one of several databases I previously dumped. when this error occurs none of the databases is restored.

what's going on here?

  • ERROR 1006 (HY000) at line 22 Show this "line 22" in your question. – Akina Jun 13 at 5:11
  • i'd love to, but i don't understand which file i should go through... – user103591 Jun 13 at 8:33
  • *i don't understand which file i should go through... * The file which is piped into mysql. /mnt/backups/190612alldb.sql in shown command line. – Akina Jun 13 at 9:33
  • Please run ls -l /mnt/backup/*.sql | grep -c 190612alldb. If 0 comes back, the file is not in that folder. If 1 comes back, then the file is there. What number comes back ??? – RolandoMySQLDBA Jun 13 at 12:34
  • What number comes back ??? file is there, it's 1 – user103591 Jun 14 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.