Usrbinmysqladmin: refreshfailed; error: amp; #39; Unknownerroramp; amp; #39; after upgrading debian wheezy, the password is changed due to an authorization error, mysql safe in debian cannot be accessed either.
I have changed bind-address to the LAN ip address in/etc/mysql/my. cnf.
And then executed
Grant all privileges on *. * TO 'root' @ '%' identified by '000000' with grant option;
Then, reload the authorization table:
Flush privileges;
After the restart, although remote connection is available, debian reports a mysql error.
/Etc/cron. daily/logrotate:
/Usr/bin/mysqladmin: refresh failed; error: 'Unknown error'
Error: error running shared postrotate script for '/var/log/mysql. log/var/log/mysql. log/var/log/mysql/mysql-slow.log'
Run-parts:/etc/cron. daily/logrotate exited with return code 1
Saved 4 messages in/home/tom/mbox
This problem occurs because the mysql_safe error. log file was created by root when the mysql service was started for the first time, and mysqladmin called cron's log segmentation to clear this log file without permission.
This bug has been fixed in the new debian sid, but the stable version has not yet received this fix.
Solution:
Reconfigure mysql's error_log in my. cnf and grant your mysql permission to this file.
-rw-r----- 1 root adm 517639 [2014-07-01 9:26] mysql_error.log
Modify root to mysql.
Chown mysql/var/log/mysql/mysql_error.log