MySQL 시작 오류: ERROR 1005

MySQL 시작 오류: ERROR 1005

내 Debian MySQL 설치는 다음을 제공합니다.

Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [Note] Server socket created on IP: '127.0.0.1'.
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_current.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_history.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_history_long.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/setup_consumers.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/setup_instruments.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/setup_timers.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/performance_timers.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/threads.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_summary_by_thread_by_event_name.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_summary_by_instance.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_summary_global_by_event_name.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/file_summary_by_event_name.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/file_summary_by_instance.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/mutex_instances.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/rwlock_instances.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/cond_instances.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] /usr/sbin/mysqld: Can't find file: './performance_schema/file_instances.frm' (errno: 13)
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [Note] Event Scheduler: Loaded 0 events
Sep 25 13:38:09 xint01 mysqld: 140925 13:38:09 [Note] /usr/sbin/mysqld: ready for connections.
:
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: Running 'mysql_fix_privilege_tables'...
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1007 (HY000) at line 160: Can't create database 'performance_schema'; database exists
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 183: Can't create table 'cond_instances' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 213: Can't create table 'events_waits_current' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 227: Can't create table 'events_waits_history' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 241: Can't create table 'events_waits_history_long' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 262: Can't create table 'events_waits_summary_by_instance' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 283: Can't create table 'events_waits_summary_by_thread_by_event_name' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 303: Can't create table 'events_waits_summary_global_by_event_name' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 320: Can't create table 'file_instances' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 339: Can't create table 'file_summary_by_event_name' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 359: Can't create table 'file_summary_by_instance' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 376: Can't create table 'mutex_instances' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 394: Can't create table 'performance_timers' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 412: Can't create table 'rwlock_instances' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 428: Can't create table 'setup_consumers' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 445: Can't create table 'setup_instruments' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 461: Can't create table 'setup_timers' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: ERROR 1005 (HY000) at line 478: Can't create table 'threads' (errno: 13)
Sep 25 13:38:10 xint01 /etc/mysql/debian-start[20151]: FATAL ERROR: Upgrade failed

MySQL에는 영향을 미치지 않는 것 같은데, 어떻게 제거/수정하나요?

mysql --version
mysql  Ver 14.14 Distrib 5.5.38, for debian-linux-gnu (x86_64) using readline 6.2

- 편집하다 -

mysql_upgrade위의 ":" 뒤에 동일한 오류가 발생하는 것과 관련된 것 같습니다.

답변1

Errno 13은 "권한이 거부됨"을 의미하며, 파일 자체를 읽을 수 없거나 파일을 발생시키는 디렉토리에 액세스할 수 없습니다(/, /var, /var/lib에는 mysql 사용자, /var/lib/mysql 및 다음 버전에서는 /write/execute를 읽어야 합니다.)

이 경우 /var/lib/mysql 아래의 mysql/performance_schema 디렉토리로 제한되는 것으로 보입니다. 해당 디렉토리를 수정하여 mysql/mysql 디렉토리와 동일한 권한, 사용자/그룹을 표시합니다.

편집: Ole이 지적한 대로 스풀을 lib로 대체했습니다.

관련 정보