Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Won't Fix
-
Affects Version/s: 5.5.40, 10.0.15
-
Fix Version/s: N/A
-
Component/s: Scripts & Clients
-
Environment:Linux
Description
Putting a "database=some_db" (where some_db is a valid database) under the [client] section of ~/.my.cnf (or any other config files parsed by mysqldump) will result on this warning on the execution of mysqldump, even if a database (or several) are specified for the dump :
$ mysqldump --help Warning: mysqldump: ignoring option '--databases' due to invalid value 'valid_db' mysqldump Ver 10.14 Distrib 5.5.40-MariaDB, for debian-linux-gnu (i686) Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. [...]
$ mysqldump valid_db Warning: mysqldump: ignoring option '--databases' due to invalid value 'valid_db' -- MySQL dump 10.14 Distrib 5.5.40-MariaDB, for debian-linux-gnu (i686) -- -- Host: localhost Database: valid_db [...]
The same happens when running "mysqldump --databases some_db"
The error message is confusing as the specified database name is valid.
The upstream bug (http://bugs.mysql.com/bug.php?id=18209) has been reported almost a decade ago and a patch that added the specific option "database" to mysqldump has been provided on the bug report but never made it to the main tree : http://lists.mysql.com/commits/6311
Another solution would be to make simply that mysqldump doesnt read the database parameter from the config file which would be safe as it should have never worked before.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
As a side note, mysqladmin also doesnt like the database variable on the [client] section :