Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Not a Bug
-
Affects Version/s: 5.5.27
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Debian Squeeze i386 / Official MariaDB packages
Description
root@v1194:~# grep database ~/.my.cnf database=mysql root@v1194:~# mysqladmin mysqladmin: unknown variable 'database=mysql'
While the database=DBNAME parameter is read and used by the mysql command line client and mytop it makes mysqladmin to fail.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
This is not a bug. See mysql --help and mysqladmin --help. mysql command line client has a --database option, while mysqladmin does not. That's why mysql recognizes it in the my.cnf and mysqladmin does not. The [client] section in the my.cnf is read by all mysql clients (again, see the --help output of mysql and mysqladmin). You have two options:
1. use the "loose" prefix: loose-database=mysql. It will cause mysqladmin to ignore unknown options, it won't abort.
2. move the database option to the [mysql] section of the my.cnf, this section is read only by the mysql command line client, and not by mysqladmin.