Bug #69330 mysql: unknown variable long_query_time
Submitted: 27 May 2013 20:31 Modified: 28 May 2013 7:05
Reporter: martin fuxa Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.11 5.5.30 OS:Any
Assigned to: CPU Architecture:Any

[27 May 2013 20:31] martin fuxa
Description:
DOC says
Command-Line Format	--long_query_time=#
http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_long_query_time

but this one does not work

mysql --login-path=root --long_query_time=10
mysql: unknown variable 'long_query_time=10'

mysql -u root -p DB --long_query_time=10
mysql: unknown variable 'long_query_time=10'

How to repeat:
see Description
[28 May 2013 6:29] MySQL Verification Team
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/refman/5.6/en/mysql-command-options.html

This option/variable is not available for mysql client but for mysqld server which is explained here http://dev.mysql.com/doc/refman/5.6/en/mysqld-option-tables.html

Workaround: Alternatively, you can set the long_query_time after connecting to the server using mysql client as:

mysql>set long_query_time=10;
Query OK, 0 rows affected (0.00 sec)
[28 May 2013 7:05] martin fuxa
oops, sorry mysqld != mysql

btw it's possible use 
mysql --init-command="set long_query_time=10;"