Usr/bin/mysqladmin:refresh failed; Error: ' Unknown error '

Source: Internet
Author: User
Tags log log

Debian wheezy upgrade, because of authorization errors, resulting in password changes, in the Debian safe under the MySQL can not access.
I have modified the bind-address for LAN IP in/ETC/MYSQL/MY.CNF
And then executed the
GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
Then overload the authorization table:
FLUSH privileges;

After the reboot, although it can be remotely linked, but Debian itself reported 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/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 arises because the first time the MySQL service started when the Mysql_safe error.log log file was created by root, mysqladmin call cron log split to clear the log file without permission.

This bug has been fixed in the new Debian Sid, but the stable version has not yet received this fix.

Workaround:

Reconfigure the error_log under MySQL, inside the my.cnf. And let your MySQL have permissions on this file.

-rw-r-----  1 root  adm      517639 [2014-07-01  9:26] Mysql_error.log

You can change the root to MySQL.

Chown Mysql/var/log/mysql/mysql_error.log



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.