Bug #38222 mysqldump utility does not backup all databases
Submitted: 18 Jul 2008 11:04 Modified: 19 Aug 2008 12:07
Reporter: Kaustubh Kane Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:MySQL 5.0.51a OS:Solaris
Assigned to: CPU Architecture:Any

[18 Jul 2008 11:04] Kaustubh Kane
Description:
In my MySQL server I have two databases, one is the administrative database that MySQL has "mysql" and the other is my application database. 

I am performing a backup with the mysqldump utility. I specify the option --all-databases="TRUE" while executing the mysqldump utility. But it does not backupn the "mysql" database. 

I also tried specifying all-databases parameter in my.cnf file as below: 
[mysqldump] 
all-databases = "TRUE" 

But even this does not work. It still backs up only my application database. 

I am using MySQL 5.0.51a. 
The default value of parameter all-databases is set to FALSE.

How to repeat:
Run the mysqldump utility with --all-databases="TRUE"
or 
specify all-databases parameter in my.cnf file as below: 
[mysqldump] 
all-databases = "TRUE"
[18 Jul 2008 14:25] Giuseppe Maxia
I tried the given instruction on OpenSolaris, Mac OSX and Linux, with 5.0.51, and in all cases, mysqldump dumped the mysql database.

Please run 
mysqldump --version
and report the output.
Thanks

Giuseppe
[19 Jul 2008 6:25] Kaustubh Kane
Here's the ouput of :
bash-3.00# /usr/local/mysql/bin/mysqldump --version  
mysqldump  Ver 10.11 Distrib 5.0.51a, for sun-solaris2.10 (sparc)

I noticed an intresting thing. Today i tried a backup on a different system that has the same configuration as earlier one. 
When I invoked mysqldump utility with --all-databases="TRUE" it backed up "mysql" database along with my application database. 
The exact command is: 
mysqldump -uroot -proot --flush-logs --all-databases="TRUE" > /tmp/backup.sql

It seems to be very weird that why it did not backup "mysql" database along with my application database earlier when I reported the bug. Though at that time it was a different system, the MySQL version and system conditions were still the same. It looks like the issue is intermittent.

Following is the excerpt of "mysqldump --help"
Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
all                               TRUE
all-databases                     FALSE
add-drop-database                 FALSE
[19 Jul 2008 12:07] Valeriy Kravchuk
Do you still have access to that system where problem was initially noted?
[19 Aug 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".