Bug #7524 different result mysqladmin and mysql, with default-character-set on my.cnf.
Submitted: 24 Dec 2004 8:15 Modified: 12 Jan 2005 20:12
Reporter: Cheon Audwox Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.8 OS:Linux (Linux 2.4.27)
Assigned to: Jim Winstead CPU Architecture:Any

[24 Dec 2004 8:15] Cheon Audwox
Description:
MySQL binary distribution was compiled with latin1 characterset for system default.

If adding below lines in /etc/my.cnf for using other characterset as default, looks good.

/etc/my.cnf

	[client]
	default-character-set = euckr

	[mysqld]
	default-character-set = euckr

mysql status information:

	mysql> \s
	--------------
	/usr/local/mysql/bin/mysql  Ver 14.7 Distrib 4.1.8, for pc-linux (i686)

	Connection id:          7
	Current database:
	Current user:           root@localhost
	SSL:                    Not in use
	Current pager:          stdout
	Using outfile:          ''
	Using delimiter:        ;
	Server version:         4.1.8-max
	Protocol version:       10
	Connection:             Localhost via UNIX socket
	Server characterset:    euckr
	Db     characterset:    euckr
	Client characterset:    euckr
	Conn.  characterset:    euckr
	UNIX socket:            /tmp/mysql.sock
	Uptime:                 51 min 43 sec

	Threads: 1  Questions: 17  Slow queries: 0  Opens: 11  Flush tables: 1  Open tables: 0  Queries per second avg: 0.005
	--------------

But, I tried mysqladmin, does not working.

	# ./mysqladmin -u root -p shutdown
	/usr/local/mysql/bin/mysqladmin: unknown variable 'default-character-set=euckr'

mysqladmin correctly running with latin1 Server characterset and Conn. chracterset, when I deleted default-character-set setting in [client] section.

Thank you.

How to repeat:
1. add default-character-set=euckr into [client] section of /etc/my.cnf.
2. try running mysqladmin.
[24 Dec 2004 8:22] Cheon Audwox
(subject edited)
[27 Dec 2004 12:18] Victoria Reznichenko
mysqladmin doesn't support --default-character-set option.

From the MySQL manual:

The [client] option group is read by all client programs (but not by mysqld). This allows you to specify options that apply to every client. For example, [client] is the perfect group to use to specify the password that you use to connect to the server. (But make sure that the option file is readable and writable only by yourself, so that other people cannot find out your password.) Be sure not to put an option in the [client] group unless it is recognized by all client programs that you use. Programs that do not understand the option will quit after displaying an error message if you try to run them.
[27 Dec 2004 13:32] Sergei Golubchik
I think it's a bug in mysqladmin that it doesn't support default-character-set option. For create, drop, and password commands the server needs to know what charset was used.
[12 Jan 2005 20:12] Paul Dubois
Mentioned in 4.1.9 change notes.