How to install MySQL-server on OSMC MediaCenter?

Hi everyone,

I’m very happy with OSMC Mediacenter, but I’m runnning in some trouble while installing MySQL-server.
I added this question to StackOverflow already with no answer after two weeks, so I decided to post the same question here: debian - How to install MySQL on OSMC MediaCenter? - Stack Overflow

I execute the following command for installation.

sudo apt-get install mysql-server mysql-client

An error occured after installation.

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.5.49-0+deb8u1) ...
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 package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for systemd (215-17+deb8u4) ...
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Result of journalctl -xn

-- Logs begin at Fri 2016-05-06 23:11:58 CEST, end at Sat 2016-05-07 16:44:30 CEST. --
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf pin
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: [61B blob data]
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exis
May 07 16:44:25 osmc /etc/init.d/mysql[16910]:
May 07 16:44:25 osmc mysql[16111]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
May 07 16:44:25 osmc systemd[1]: mysql.service: control process exited, code=exited status=1
May 07 16:44:25 osmc systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
May 07 16:44:25 osmc systemd[1]: Unit mysql.service entered failed state.
May 07 16:44:30 osmc sudo[15538]: pam_unix(sudo:session): session closed for user root

Does anyone know a solution?

Thanks a lot,
Jordy

Well, reverse whatever you have done (purge/remove) and just install the MYSQL Server from App Store

Not sure if it supports ARM but use the MySQL APT repository if you can: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/. Purge the old packages first.

I installed MySQL via RaspBMC in the past, but development on RaspBMC is discontinued. OSMC works perfect as MediaCenter, I like it, but it’s very hard to install MySQL. It’s a real challange to get MySQL working :yum:

Well I was really confused when I read this, so I quickly tried and I didn’t had any problem
See http://paste.osmc.io/tucilasiha

Are you fully updated?
Do you have the default repositories?
Are you sure you don’t have a file system issue?

Hi,

Thank you for your answer. I have copied your questions and I give below the answer.

Are you fully updated?
Yes.

Do you have the default repositories?
Yes.

Are you sure you don’t have a file system issue?
I don’t know. How can I verify that?

I don’t know why. It’s done exactly the same as for Raspbmc.

Well, you might see errors in dmesg or also other applications might just fail.

As you can see in the install log that I attached to my posts MYSQL server just install fine on OSMC.