Usr/bin/mysqladmin: refreshfailed; error: & amp; # x27; Unk_MySQL

Source: Internet
Author: User
Usrbinmysqladmin: refreshfailed; error: amp; # x27; Unknownerroramp; amp; # x27; after debian wheezy is upgraded, 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 rootadm517639 [2014-07-019:26] mysql_error.log

Modify 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.