1

I recently bought a VPS box with Debian Squeeze pre-installed as the OS. I upgraded to Debian Wheezy and most things work fine (e.g. apache).

The problem I'm having relates to MySQL - which is just not starting since the upgrade to wheezy. I have researched this and tried many solutions along the lines of uninstalling and re-installing MySQL completely and yet i get the same fail message when the MySQL process attempts to start up.

Seems to be a dependency problem - but I don't understand what it means!

I have tried several solutions including some from this forum including:

And these have still not resolved the issue.

The full trace of messages when I do a clean install is below - would appreciate any comments/help as am really stuck on this! Thanks.

root@vps:~# apt-get install mysql-server mysql-client mysql-common
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-server-5.5
Suggested packages:
libterm-readkey-perl tinyca
The following NEW packages will be installed:
libdbd-mysql-perl libmysqlclient18 mysql-client mysql-client-5.5 mysql-common mysql-server mysql-server-5.5
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4598 kB of archives.
After this operation, 71.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
dpkg: warning: files list file for package 'liblzma5:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-common-data:i386' missing; assuming package has no files currently installed
(Reading database ... 29267 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.35+dfsg-0+wheezy1_all.deb) ...
Selecting previously unselected package libmysqlclient18:i386.
Unpacking libmysqlclient18:i386 (from .../libmysqlclient18_5.5.35+dfsg-0+wheezy1_i386.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.021-1+b1_i386.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.35+dfsg-0+wheezy1_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.35+dfsg-0+wheezy1) ...
Selecting previously unselected package mysql-server-5.5.
dpkg: warning: files list file for package 'liblzma5:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-common-data:i386' missing; assuming package has no files currently installed
(Reading database ... 29365 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.35+dfsg-0+wheezy1_i386.deb) ...
Selecting previously unselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.5.35+dfsg-0+wheezy1_all.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.35+dfsg-0+wheezy1_all.deb) ...
Processing triggers for man-db ...
Setting up libmysqlclient18:i386 (5.5.35+dfsg-0+wheezy1) ...
Setting up libdbd-mysql-perl (4.021-1+b1) ...
Setting up mysql-client-5.5 (5.5.35+dfsg-0+wheezy1) ...
Setting up mysql-server-5.5 (5.5.35+dfsg-0+wheezy1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.5.35+dfsg-0+wheezy1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
pranath
  • 11
  • 1
  • 3

2 Answers2

1

MyISAM was the default storage engine for the MySQL relational database management system versions prior to 5.5 http://en.wikipedia.org/wiki/MyISAM

Wheezy deprecates the use of MyISAM with MySQL 5.5.

Simply add:

default-storage-engine=myisam

..under the [mysqld] section in the file /etc/mysql/my.cnf

I recently ran into this when doing an upgrade from Debian Squeeze to Wheezy. After the upgrade MySQL just failed to start.

The symptoms I got were a bit similar to what is posted here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682232

However, the proposed solution of

rm /var/lib/mysql/ib*

..did not work for me.

To make things more interesting, there were no errors written to the mysql log files. They were there, but just 0 bytes. Btw, the /var/log/mysql directory was empty.

wordpress:~#  l -dg /var/log/mysql*
drwxr-s--- 2 adm 4.0K Jun 10  2010 /var/log/mysql
-rw-r----- 1 adm    0 Oct  9 15:06 /var/log/mysql.err
-rw-r----- 1 adm    0 Oct  9 15:06 /var/log/mysql.log

I then ran the mysqld command from the command line. This finally produced some helpful information:

wordpress:~# mysqld
141009 15:39:50 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
141009 15:39:50 [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.
141009 15:39:50 [Note] Plugin 'FEDERATED' is disabled.
141009 15:39:50 InnoDB: The InnoDB memory heap is disabled
141009 15:39:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141009 15:39:50 InnoDB: Compressed tables use zlib 1.2.7
141009 15:39:50 InnoDB: Using Linux native AIO
141009 15:39:50 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
141009 15:39:50 InnoDB: Completed initialization of buffer pool
141009 15:39:50 InnoDB: Fatal error: cannot allocate memory for the buffer pool
141009 15:39:50 [ERROR] Plugin 'InnoDB' init function returned error.
141009 15:39:50 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141009 15:39:50 [ERROR] Unknown/unsupported storage engine: InnoDB
141009 15:39:50 [ERROR] Aborting

141009 15:39:50 [Note] mysqld: Shutdown complete

Apparently, InnoDB was not supported. This is fine for me as I have been using MyISAM in the past on this server.

A quick search for some of these errors pointed to a link (also on ServerFault) with the anser in one of the comments:

Unknown/unsupported storage engine: InnoDB | MySQL Ubuntu

The key is to specify the default storage engine as per Andy Mikhaylenko's answer.

Apparently the answer also speaks of adding skip-innodb but that wasn't a requirement on my system to make MySQL start up again.

captcha
  • 568
  • 5
  • 16
0

In addition, I got the error

160307 21:49:22 [ERROR] mysqld: unknown option '--skip-bdb'

so had to comment out the option

skip-bdb

as this is obviously not known any more to mysqld 5.5. Probably left over from quite an old version of mysql, as this box has started out with Debian sarge.

Drifter104
  • 3,693
  • 2
  • 22
  • 39