1

Here I was, following this tutorial (http://www.penguintutor.com/linux/raspberrypi-webserver), because I wanted to host a pretty simple PHP site on my Raspberry Pi.

But once again, as it usually happens in other newly intalled distributions on my desktop computers, nothing works and all applications seem to be tailored for terminal gurus who live in dark and deep caves and like to compile each breath they take.

When I try to install MySQL, I get the following error:

Enter image description here

And in my terminal it leaves me other error messages:

pi@raspberrypi ~ $ sudo apt-get install mysql-server-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient16 mysql-client-5.5 mysql-common
Suggested packages:
  libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient16 mysql-client-5.5 mysql-common mysql-server-5.5
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5,191 kB of archives.
After this operation, 70.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 74751 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.40-0+wheezy1_all.deb) ...
Selecting previously unselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.62-1_armhf.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.021-1_armhf.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.40-0+wheezy1_armhf.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.40-0+wheezy1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 74850 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.40-0+wheezy1_armhf.deb) ...
Processing triggers for man-db ...
Setting up libmysqlclient16 (5.1.62-1) ...
Setting up libdbd-mysql-perl (4.021-1) ...
Setting up mysql-client-5.5 (5.5.40-0+wheezy1) ...
Setting up mysql-server-5.5 (5.5.40-0+wheezy1) ...
[ ok ] Stopping MySQL database server: mysqld.
140909 13:47:45 [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.
140909 13:47:45 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
140909 13:47:45 [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.
140909 13:47:45 [Note] Plugin 'FEDERATED' is disabled.
140909 13:47:45 InnoDB: The InnoDB memory heap is disabled
140909 13:47:45 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140909 13:47:45 InnoDB: Compressed tables use zlib 1.2.7
140909 13:47:45 InnoDB: Using Linux native AIO
140909 13:47:45 InnoDB: Initializing buffer pool, size = 128.0M
140909 13:47:45 InnoDB: Completed initialization of buffer pool
140909 13:47:45 InnoDB: highest supported file format is Barracuda.
140909 13:47:46  InnoDB: Waiting for the background threads to start
140909 13:47:47 InnoDB: 5.5.40 started; log sequence number 1595675
140909 13:47:47 [ERROR] Aborting

140909 13:47:47  InnoDB: Starting shutdown...
140909 13:47:48  InnoDB: Shutdown completed; log sequence number 1595675
140909 13:47:48 [Note]
[FAIL] 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
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi ~ $

Every time I try Linux, things like these come to the surface. The installation is a clean one, the hardware is well known (it's a Raspberry Pi...). So I can safely assume that the MySQL guys didn't even bother to test their software in such conditions.

Every googling I do doesn't come up with a solution, and I've tried every possible workaround known by the books and nothing. Things just don't work... I wish Raspberry Pi could run on Windows or MacOS...

Now I'm going to remove all MySQL-related stuff and try again to see if the outcome changes (it won't).

So I'll run:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo find -name mysql | xargs sudo rm -r
sudo shutdown -r 0

And now I will do:

sudo apt-get install mysql-server
  • I didn't go through the rather dated tutorial above, but saw enough to convince me it will not work with current Raspbian. Try following raspberrypi.org/learning/lamp-web-server-with-wordpress/… - you can ignore the WordPress step, if you don't want WordPress - the LAMP should work. – Milliways Oct 8 '16 at 22:29
  • Not sure if this is related, but you're trying to install an old version of MySQL. I don't see how that can help, even if not the primary problem. As noted in an answer, "clean" installation may or may not be a good starting point. You want to bring everything up to date for the easiest experience. – Brick Jul 24 '17 at 21:27
0

Try running

sudo apt-get update

and

sudo apt-get upgrade

before installing mysql

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.