Bug #75651 max_allowed_packet in client section conflicts with mysqladmin
Submitted: 27 Jan 2015 12:46 Modified: 17 Jul 2015 13:31
Reporter: Oli Sennhauser Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:any OS:Any
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: client, max_allowed_packet, my.cnf, mysqladmin

[27 Jan 2015 12:46] Oli Sennhauser
Description:
max_allowed_packet variable can be located in the [mysql] [mysqldump] and [client] section in my.cnf

it is convenient to put it into the [client] section to NOT have redundant (or differing) information for dump/restore (mysql/mysqldump) to avoid max_allowed_packet errors.

But then we have the problem that the mysqladmin client utility will fail because it does not know the max_allowed_packet variable.

How to repeat:
mysqladmin: unknown option '--max-allowed-packet'

Suggested fix:
It would be nice to either
a) ignore max_allowed_packet in mysqladmin
b) use max_allowed_packet in mysqladmin client utility to make it consistent between ALL mysql client utilities...
[28 Jan 2015 14:18] Shane Bester
for (a),  you can prefix any unknown option with 'loose' to have it ignored, except then it generates a warning,  maybe not exactly ignoring it;

>mysqladmin --no-defaults ping --loose-max-allowed-packet=1G
Warning: mysqladmin: unknown variable 'loose-max-allowed-packet=1G'
mysqld is alive
[17 Jul 2015 13:31] Georgi Kodinov
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

The entirety of the client utilities will never have all possible options.
So I guess what Shane suggests should do it if you want to avoid specifying the option for the individual utilities.