[MDEV-3803] mysqladmin cannot be executed if ~/.my.cnf contains database=XXX string Created: 2012-10-10  Updated: 2012-10-10  Resolved: 2012-10-10

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.27
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Jean Weisbuch Assignee: Unassigned
Resolution: Not a Bug Votes: 0
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.



 Comments   
Comment by Sergei Golubchik [ 2012-10-10 ]

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.

Comment by Jean Weisbuch [ 2012-10-10 ]

Didnt't knew about that "loose-" prefix ; it should be implemented it to mytop then (unknown options only throws a warning on mytop so its not an important feature).

Generated at Thu Feb 08 06:51:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.