MySQL Server 5.6 无法在 Ubuntu Wily 上安装

MySQL Server 5.6 无法在 Ubuntu Wily 上安装

我有 Ubuntu 15.10 (wily) 并且正在尝试将 MySQL 更新到最新版本。

当我运行时aptitude safe-upgrade,它会失败,如下所示:

Errors were encountered while processing:
 mysql-server-5.6
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
Setting up mysql-server-5.6 (5.6.28-0ubuntu0.15.10.1) ...
 * Stopping MySQL database server mysqld                                                                                                                                     [ OK ] 
 * Starting MySQL database server mysqld                                                                                                                                     [ OK ] 
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.6; however:
  Package mysql-server-5.6 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.6
 mysql-server

dpkg -l显示:

rc  mysql-server-5.5                        5.5.46-0ubuntu0.14.04.2  amd64                    MySQL database server binaries and system database setup
iF  mysql-server-5.6                        5.6.28-0ubuntu0.15.10.1  amd64                    MySQL database server binaries and system database setup

这是 MySQL 错误日志:

160318 00:22:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-03-18 00:22:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-18 00:22:20 0 [Note] /usr/sbin/mysqld (mysqld 5.6.28-0ubuntu0.15.10.1) starting as process 4383 ...
2016-03-18 00:22:20 4383 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2016-03-18 00:22:20 4383 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2016-03-18 00:22:20 4383 [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.
2016-03-18 00:22:20 4383 [Note] Plugin 'FEDERATED' is disabled.
2016-03-18 00:22:20 4383 [ERROR] Function 'innodb' already exists
2016-03-18 00:22:20 4383 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
2016-03-18 00:22:20 4383 [ERROR] Function 'federated' already exists
2016-03-18 00:22:20 4383 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
2016-03-18 00:22:20 4383 [ERROR] Function 'blackhole' already exists
2016-03-18 00:22:20 4383 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
2016-03-18 00:22:20 4383 [ERROR] Function 'archive' already exists
2016-03-18 00:22:20 4383 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
2016-03-18 00:22:20 4383 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-03-18 00:22:20 4383 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-18 00:22:20 4383 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-18 00:22:20 4383 [Note] InnoDB: Memory barrier is not used
2016-03-18 00:22:20 4383 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-03-18 00:22:20 4383 [Note] InnoDB: Using Linux native AIO
2016-03-18 00:22:20 4383 [Note] InnoDB: Not using CPU crc32 instructions
2016-03-18 00:22:20 4383 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-03-18 00:22:20 4383 [Note] InnoDB: Completed initialization of buffer pool
2016-03-18 00:22:20 4383 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-18 00:22:20 4383 [Note] InnoDB: 128 rollback segment(s) are active.
2016-03-18 00:22:20 4383 [Note] InnoDB: Waiting for purge to start
2016-03-18 00:22:20 4383 [Note] InnoDB: 5.6.28 started; log sequence number 520254865948
2016-03-18 00:22:20 4383 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2016-03-18 00:22:20 4383 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2016-03-18 00:22:20 4383 [Note] Server socket created on IP: '127.0.0.1'.
2016-03-18 00:22:20 4383 [Note] Event Scheduler: Loaded 0 events
2016-03-18 00:22:20 4383 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.28-0ubuntu0.15.10.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

Launchpad bug 1468185 似乎意味着 InnoDB 错误可以安全忽略: https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1468185

明天会尝试修复这个问题。请注意,这不是一个严重的错误,只是输出垃圾信息,所以解决方法基本上就是忽略它 :)

更新:问题来自invoke-rc.d:

# /etc/init.d/mysql stop
 * Stopping MySQL database server mysqld                           [ OK ] 
# /etc/init.d/mysql start
 * Starting MySQL database server mysqld                           [ OK ] 
# invoke-rc.d mysql stop
 * Stopping MySQL database server mysqld                           [ OK ] 
# invoke-rc.d mysql start
 * Starting MySQL database server mysqld                           [ OK ] 
invoke-rc.d: initscript mysql, action "start" failed.

相关内容