MySQL/MariaDB Migration

Issues related to applications and software problems
Post Reply
gw1500se
Posts: 191
Joined: 2012/05/07 13:53:35

MySQL/MariaDB Migration

Post by gw1500se » 2014/11/09 16:29:46

I don't know what was wrong with MySQL that it needed to be replaced with MariaDB but I'll go with the flow unless it becomes too much unnecessary work or frustration. To make life easy on myself I shutdown MySQL on the old server and rsync'ed /var/lib/mysql to the new server. I then tried to start the service which failed with no useful error messages:

Code: Select all

Nov 09 11:26:25 localhost.localdomain systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has begun starting up.
Nov 09 11:26:25 localhost.localdomain mysqld_safe[29592]: 141109 11:26:25 mysqld_safe Logging to '/var/log/mysql/mysql.log'.
Nov 09 11:26:25 localhost.localdomain mysqld_safe[29592]: 141109 11:26:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 09 11:26:27 localhost.localdomain mysqld_safe[29592]: 141109 11:26:27 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
Nov 09 11:26:27 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Nov 09 11:26:27 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Nov 09 11:26:27 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
I googled the error message and only found information about 'mysql_upgrade' which had already been run. So the question is, how do I debug this? TIA.

User avatar
jyoung
Posts: 102
Joined: 2014/09/22 13:40:31
Location: Nashville, TN, USA

Re: MySQL/MariaDB Migration

Post by jyoung » 2014/11/09 17:22:38

First, I'd try a

Code: Select all

setenforce 0
, and then

Code: Select all

systemctl start mariadb
, or even better,

Code: Select all

tail -n 100 /var/log/mysql/mysql.log
. The reason that the service failed would be in your mariadb log. My guess is that you're running different versions of SELinux policy between old server and new server, and have possibly run into a situation in which the extended attributes that you rsync'ed aren't playing nicely with your mariadb instance.

First, check your log messages (and share them here for future users with this problem). If, by chance, setting SELinux to permissive allows mariadb to startup succesfully, share the output of

Code: Select all

ausearch -m avc -ts today
.
-- Jeremy --

gw1500se
Posts: 191
Joined: 2012/05/07 13:53:35

Re: MySQL/MariaDB Migration

Post by gw1500se » 2014/11/09 17:53:44

Thanks for the reply. I've run into this trap so may times you'd think I'd learn. Wrong permissions on /var/run/mysql.

lightman47
Posts: 1161
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: MySQL/MariaDB Migration

Post by lightman47 » 2014/11/12 20:07:08

An aside to address your initial comment - MySQL -> MariaDB

conjecture:

I stumbled across 'media', etc. that led me to believe this was a similar situation to the OpenOffice/LibreOffice migration. My impression was that sOme big commercial corporation attempted to swallow up an open source competitor ... but not before a group of their folk 'jumped ship' with their code to establish another open source project.

- I have no proof; just sayin'

P.S. It would seem that our 'Linux (perhaps Red Hat - dunno who) folk' are keeping an eye on us users.
Last edited by lightman47 on 2014/11/12 20:17:29, edited 1 time in total.
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: MySQL/MariaDB Migration

Post by gerald_clark » 2014/11/12 20:11:25

It's no secret. The author of MySQL took his open source software and started MariaDB.

User avatar
TrevorH
Forum Moderator
Posts: 29120
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MySQL/MariaDB Migration

Post by TrevorH » 2014/11/12 20:13:17

The history goes something like start MySQL -> sell to Sun, Sun gets bought by Oracle. Cue forks of the product...
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”