我有一台 VPS,在其中运行 apache 和 mysql,从昨天起我无法再启动 mysql 服务器:
sudo service mysql start
start: Job failed to start
error.log 的输出位于/var/log/mysql/error.log
:
2015-10-31 01:20:37 9857 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2015-10-31 01:20:37 9857 [Note] Plugin 'FEDERATED' is disabled.
2015-10-31 01:20:37 9857 [ERROR] Function 'innodb' already exists
2015-10-31 01:20:37 9857 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
2015-10-31 01:20:37 9857 [ERROR] Function 'federated' already exists
2015-10-31 01:20:37 9857 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
2015-10-31 01:20:37 9857 [ERROR] Function 'blackhole' already exists
2015-10-31 01:20:37 9857 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
2015-10-31 01:20:37 9857 [ERROR] Function 'archive' already exists
2015-10-31 01:20:37 9857 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
2015-10-31 01:20:37 9857 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-31 01:20:37 9857 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-31 01:20:37 9857 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-31 01:20:37 9857 [Note] InnoDB: Memory barrier is not used
2015-10-31 01:20:37 9857 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-10-31 01:20:37 9857 [Note] InnoDB: Using Linux native AIO
2015-10-31 01:20:37 9857 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-31 01:20:37 9857 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-31 01:20:37 9857 [Note] InnoDB: Completed initialization of buffer pool
2015-10-31 01:20:37 9857 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-31 01:20:37 9857 [Note] InnoDB: The log sequence numbers 2997681 and 2997681 in ibdata files do not match the log sequence number 2997691 in the ib_logfiles!
2015-10-31 01:20:37 9857 [Note] InnoDB: Database was not shutdown normally!
2015-10-31 01:20:37 9857 [Note] InnoDB: Starting crash recovery.
2015-10-31 01:20:37 9857 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-10-31 01:20:37 9857 [ERROR] InnoDB: Tried to read 16384 bytes at offset 0. Was only able to read 0.
2015-10-31 01:20:37 7f082bec7780 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2015-10-31 01:20:37 9857 [ERROR] InnoDB: File (unknown): 'read' returned OS error 71. Cannot continue operation
2015-10-31 01:20:39 9899 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2015-10-31 01:20:39 9899 [Note] Plugin 'FEDERATED' is disabled.
2015-10-31 01:20:39 9899 [ERROR] Function 'innodb' already exists
2015-10-31 01:20:39 9899 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
2015-10-31 01:20:39 9899 [ERROR] Function 'federated' already exists
2015-10-31 01:20:39 9899 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
2015-10-31 01:20:39 9899 [ERROR] Function 'blackhole' already exists
2015-10-31 01:20:39 9899 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
2015-10-31 01:20:39 9899 [ERROR] Function 'archive' already exists
2015-10-31 01:20:39 9899 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
2015-10-31 01:20:39 9899 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-31 01:20:39 9899 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-31 01:20:39 9899 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-31 01:20:39 9899 [Note] InnoDB: Memory barrier is not used
2015-10-31 01:20:39 9899 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-10-31 01:20:39 9899 [Note] InnoDB: Using Linux native AIO
2015-10-31 01:20:39 9899 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-31 01:20:39 9899 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-31 01:20:39 9899 [Note] InnoDB: Completed initialization of buffer pool
2015-10-31 01:20:39 9899 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-31 01:20:39 9899 [Note] InnoDB: The log sequence numbers 2997681 and 2997681 in ibdata files do not match the log sequence number 2997691 in the ib_logfiles!
2015-10-31 01:20:39 9899 [Note] InnoDB: Database was not shutdown normally!
2015-10-31 01:20:39 9899 [Note] InnoDB: Starting crash recovery.
2015-10-31 01:20:39 9899 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-10-31 01:20:39 9899 [ERROR] InnoDB: Tried to read 16384 bytes at offset 0. Was only able to read 0.
2015-10-31 01:20:39 7f6cada08780 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2015-10-31 01:20:39 9899 [ERROR] InnoDB: File (unknown): 'read' returned OS error 71. Cannot continue operation
2015-10-31 01:20:40 9941 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2015-10-31 01:20:40 9941 [Note] Plugin 'FEDERATED' is disabled.
2015-10-31 01:20:40 9941 [ERROR] Function 'innodb' already exists
2015-10-31 01:20:40 9941 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
2015-10-31 01:20:40 9941 [ERROR] Function 'federated' already exists
2015-10-31 01:20:40 9941 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
2015-10-31 01:20:40 9941 [ERROR] Function 'blackhole' already exists
2015-10-31 01:20:40 9941 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
2015-10-31 01:20:40 9941 [ERROR] Function 'archive' already exists
2015-10-31 01:20:40 9941 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
2015-10-31 01:20:40 9941 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-31 01:20:40 9941 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-31 01:20:40 9941 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-31 01:20:40 9941 [Note] InnoDB: Memory barrier is not used
2015-10-31 01:20:40 9941 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-10-31 01:20:40 9941 [Note] InnoDB: Using Linux native AIO
2015-10-31 01:20:40 9941 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-31 01:20:40 9941 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-31 01:20:40 9941 [Note] InnoDB: Completed initialization of buffer pool
2015-10-31 01:20:40 9941 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-31 01:20:40 9941 [Note] InnoDB: The log sequence numbers 2997681 and 2997681 in ibdata files do not match the log sequence number 2997691 in the ib_logfiles!
2015-10-31 01:20:40 9941 [Note] InnoDB: Database was not shutdown normally!
2015-10-31 01:20:40 9941 [Note] InnoDB: Starting crash recovery.
2015-10-31 01:20:40 9941 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-10-31 01:20:40 9941 [ERROR] InnoDB: Tried to read 16384 bytes at offset 0. Was only able to read 0.
2015-10-31 01:20:40 7f3b70b2e780 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2015-10-31 01:20:40 9941 [ERROR] InnoDB: File (unknown): 'read' returned OS error 71. Cannot continue operation`2015-10-31 01:20:37 9857
[Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release.
Please use the full name instead.
问题是,我该如何让它恢复运行?除了 apt-get upgrade 之外,我没有做太多改动。
编辑:
/var/lib/mysql/mysql 中的数据库:
columns_priv.MYD innodb_index_stats.frm slave_worker_info.ibd columns_priv.MYI innodb_index_stats.ibd slow_log.CSM columns_priv.frm innodb_table_stats.frm slow_log.CSV db.MYD innodb_table_stats.ibd slow_log.frm db.MYI ndb_binlog_index.MYD tables_priv.MYD db.frm ndb_binlog_index.MYI tables_priv.MYI event.MYD ndb_binlog_index.frm tables_priv.frm event.MYI plugin.MYD time_zone.MYD event.frm plugin.MYI time_zone.MYI func.MYD plugin.frm time_zone.frm func.MYI proc.MYD time_zone_leap_second.MYD func.frm proc.MYI time_zone_leap_second.MYI general_log.CSM proc.frm time_zone_leap_second.frm general_log.CSV procs_priv.MYD time_zone_name.MYD general_log.frm procs_priv.MYI time_zone_name.MYI help_category.MYD procs_priv.frm time_zone_name.frm help_category.MYI proxies_priv.MYD time_zone_transition.MYD help_category.frm proxies_priv.MYI time_zone_transition.MYI help_keyword.MYD proxies_priv.frm time_zone_transition.frm help_keyword.MYI servers.MYD time_zone_transition_type.MYD help_keyword.frm servers.MYI time_zone_transition_type.MYI help_relation.MYD servers.frm time_zone_transition_type.frm help_relation.MYI slave_master_info.frm user.MYD help_relation.frm slave_master_info.ibd user.MYI help_topic.MYD slave_relay_log_info.frm user.frm help_topic.MYI slave_relay_log_info.ibd help_topic.frm slave_worker_info.frm