Разное: ошибка Cron test -x /usr/sbin/anacron || ( cd / && run-parts —report /etc/cron.daily )

Ошибку Cron test -x /usr/sbin/anacron || ( cd / && run-parts —report /etc/cron.daily )

/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

«Лечим» следующим образом:
1) Извлекаем пароль пользователя debian-sys-maint из файла /etc/mysql/debian.cnf
# grep -m 1 password /etc/mysql/debian.cnf | cut -d" " -f3
CyWrilkoorEp5
# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 77
Server version: 5.5.31-0+wheezy1 (Debian)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set password=PASSWORD("CyWrilkoorEp5") where User='debian-sys-maint';
Query OK, 0 rows affected (0.03 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

mysql> exit
Принудительно запустить logrotate.
# logrotate -f /etc/logrotate.conf
ЕСЛИ будет ОШИБКА:
# logrotate -f /etc/logrotate.conf
/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 '
выполнить:
# chown mysql: /var/log/mysql/error.log
# logrotate -f /etc/logrotate.conf
Рубрики: Logrotate | 0 | 3 829 | Распечатать эту статью