[debian-mysql] Bug#806451: mysql-server-5.6: mysqladmin doesn't allow command via config file

Binerf debian at mygaia.org
Fri Nov 27 15:15:34 UTC 2015

Package: mysql-server-5.6
Version: 5.6.27-2
Severity: normal

Dear Maintainer,

After upgraded from mysql-server 5.5 to 5.6, I'm facing problem below use:
root at server~# mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
mysqladmin: refresh failed; error: 'Access denied; you need (at least one of) the RELOAD privilege(s) for this operation'
root at server~#

But I can use mysqladmin command as below:
root at server~# mysqladmin -udebian-sys-maint -p flush-logs                                                                          
Enter password: 
root at server~# 
and it works.
Password used, it just a copy/paste of the password found in /etc/mysql/debian.cnf

I've also tried with /root/.my.cnf file and removed --defaults-file=/etc/mysql/debian.cnf from the command line, I get the same problem.

Same, remove privileges to user debian-sys-maint in mysql and re-grant didn't change anything.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=locale: Cannot set LC_ALL to default locale: No such file or directory
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages mysql-server-5.6 depends on:
ii  adduser                3.113+nmu3
ii  debconf [debconf-2.0]  1.5.58
ii  init-system-helpers    1.24
ii  initscripts            2.88dsf-59.2
ii  libaio1                0.3.110-2
ii  libc6                  2.19-22
ii  libdbi-perl            1.634-1
ii  libgcc1                1:5.2.1-23
ii  libstdc++6             5.2.1-23
ii  libwrap0               7.6.q-25
ii  lsb-base               9.20150917
ii  mysql-client-5.6       5.6.27-2
ii  mysql-common           5.6.27-2
ii  mysql-server-core-5.6  5.6.27-2
ii  passwd                 1:4.2-3.1
ii  perl                   5.20.2-6
ii  psmisc                 22.21-2.1
ii  zlib1g                 1:1.2.8.dfsg-2+b1

Versions of packages mysql-server-5.6 recommends:
ii  libhtml-template-perl  2.95-2

Versions of packages mysql-server-5.6 suggests:
ii  heirloom-mailx [mailx]  12.5-5
pn  tinyca                  <none>

-- Configuration Files:
/etc/logrotate.d/mysql-server changed:
/var/log/mysql/*log {
	rotate 7
	size 1
	create 640 mysql adm
		test -x /usr/bin/mysqladmin || exit 0
		# If this fails, check debian.conf! 
		MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
		if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
		  # Really no mysqld or rather a missing debian-sys-maint user?
		  # If this occurs and is not a error please report a bug.
		  #if ps cax | grep -q mysqld; then
		  if killall -q -s0 -umysql mysqld; then
 		    exit 1
		  $MYADMIN flush-logs

/etc/mysql/mysql.conf.d/mysqld.cnf changed:
socket		= /var/run/mysqld/mysqld.sock
nice		= 0
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc-messages-dir	= /usr/share/mysql
bind-address		=
key_buffer_size		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8
myisam-recover		= BACKUP
query_cache_limit	= 1M
query_cache_size        = 16M
general_log_file        = /var/log/mysql/mysql.log
general_log             = 0
log_error = /var/log/mysql/error.log
slow_query_log_file     = /var/log/mysql/mysql-slow.log
slow_query_log          = 1
long_query_time         = 5
expire_logs_days	= 10
max_binlog_size   = 100M

-- debconf information:
  mysql-server-5.6/really_downgrade: false
  mysql-server-5.6/postrm_remove_databases: false
  mysql-server-5.6/start_on_boot: true

More information about the pkg-mysql-maint mailing list