0

My Debian MySQL installation gives this:

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

It does not seem to affect MySQL, but how can I remove/fix this?

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

-- EDIT --

It seems it is related to mysql_upgrade which gives the same errors after the ':' above.

4

Errno 13 means "permission denied", either the files themselves aren't readable and/or the directories leading to the files aren't accessible (/, /var, /var/lib need execute permissions for the mysql user, /var/lib/mysql and below needs read/write/execute).

In this case it looks like it's limited to the mysql/performance_schema directory under /var/lib/mysql; fix that directory to show the same permissions, user/group as e.g. the mysql/mysql directory.

EDIT: replaced spool with lib as pointed out by Ole.

  • /var/spool/mysql does not exist. /var/lib/mysql has perimission 700 and is owned by mysql. But /var/lib/mysql/performance_schema seemed to be owned by root. And changing that to mysql fixed the issue. – Ole Tange Sep 25 '14 at 13:48
  • Ole: you're right, I was confused a bit, I meant /var/lib/mysql. I'll edit my answer. – wurtel Sep 25 '14 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.