automysqlbackup의 cron.daily 스크립트를 중지하고 설치하는 방법 apt-get install automysqlbackup
-다음 오류가 발생합니다.
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user
'debian-sys-maint'@'localhost' for table 'cond_instances' when using LOCK TABLES
이것은 우분투 12.04 LTS로 업그레이드 한 결과 MySQL 5.5로 업그레이드 한 후 처음으로 발생했습니다.
답변
이 버그 (에서 수정 됨 automysqlbackup 2.6+debian.2-1
)는 automysqlbackup이 performance_schema
및 information_schema
데이터베이스 를 덤프하지 못하게하여 해결할 수 있습니다 . /etc/default/automysqlbackup
다음과 같이 편집 하면됩니다 :
제거에 그렙 단계에 추가 파이프를 추가 performance_schema
하고 information_schema
DBNAMES 목록에서.
따라서 시작하는 줄 DBNAMES=
과 | grep -v ^mysql$
삽입 후
| grep -v ^performance_schema$ | grep -v ^information_schema$
전에 | tr \\\r\\\n ,\
같은 마지막 줄은 다음과 같은 모양 것을
DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\r\\\n ,\ `
Jérôme Drouet에게 감사합니다.
또는 apt-package가 아닌 sourceforge의 원래 automysqlbackup 패키지를 사용하는 경우 /etc/automysqlbackup/myserver.conf에 CONFIG_db_exclude가 포함 된 행을 수정하여 performance_schema 데이터베이스를 제외 된 데이터베이스에 추가 할 수 있습니다.
# List of DBNAMES to EXLUCDE if DBNAMES is empty, i.e. ().
CONFIG_db_exclude=( 'information_schema' 'performance_schema' )