我的 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 及以下版本需要读/写/执行)。
在这种情况下,它看起来仅限于 /var/lib/mysql 下的 mysql/performance_schema 目录;修复该目录以显示相同的权限、用户/组,例如 mysql/mysql 目录。
编辑:如 Ole 指出的那样,用 lib 替换了 spool。