I am using the following command to backup all mysql databases in script that is run as cronjob.

mysqldump -u root -p'***' --all-databases > backupdb.sql

I have added new databases recently and I noticed that the new databases are not saved in the backupdb.sql. What am I missing?

  • I created these new databases using phpmyadmin.
    – UNagaswamy
    Sep 15, 2015 at 13:55
  • Unagaswamy, before mysqldump did you checked mysql >show databases ; what it show. Sep 15, 2015 at 14:54
  • mysql>show databases does show all the new databases.
    – UNagaswamy
    Sep 15, 2015 at 15:16
  • have you checked in root user privilege of your new created database or not Sep 15, 2015 at 15:20
  • sorry, I don't understand the question! Are you asking if the root has privileges on the new databases? If so, yes, the root does!
    – UNagaswamy
    Sep 15, 2015 at 15:26

1 Answer 1


1) check your last 10 lines of dump file

 tail dump.sql

it should show your dump file properly completed or not.

2) grep the database name in dump file

 cat dump.sql | grep newdb  

with the above 2 steps you can find is your backup is completed propery or not and the new database exists or not.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.