Mysqldump reports 'Unknown database' when database contains views with spaces in their names #1653
Unanswered
lirwin3007
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've spent a long time debugging this, so I thought I'd open up an issue in case it helps anyone in the future, and to report a possible bug within the package.
Our database backup suddenly started failing with a log like:
This was strange because it was complaining about an
entites
database when I was trying to dumpproduction
!After a lot of debugging, I found that the package automatically adds any views that are present in the database to the
database.connections.mysql.dump.excludeTables
config value.It turns out one of our support team had added a view to the database called
show_all entities
- putting a space before 'entities' instead of an underscore. As a result,show_all entities
was being passed to mysqldump, and I assume mysqldump was not interpreting this as intended, and was instead trying to exclude a view calledshow_all
and find a database calledentities
I've resolved this for us by telling the support worker that under no circumstances should they be manually creating anything in the database 😆 but I thought it best to still open this issue so anyone encountering a similar problem could find some information on the cause
Beta Was this translation helpful? Give feedback.
All reactions