Koozali.org: home of the SME Server

Problems with MariaDB installation in SME 8.0

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Problems with MariaDB installation in SME 8.0
« on: January 10, 2014, 10:11:07 PM »
I installed MariaDB according to the these notes:

http://wiki.contribs.org/User_talk:Mmccarn#Install_mariadb_.27alongside.27_mysql

Since installing it, I have problems booting up.  In the boot up sequence where you see things happening in the host console, when it gets to "Starting mariadb", I see,

Quote
Starting mariadb:  Starting MySQL .............
.....................................................................
.....................................................................
.....................................................................
................................................................ ERROR! [FAILED]

The string of periods go on for about half a console view and the whole thing lasts about 10 minutes.

How do I correct this problem, or better, how do I remove mariadb?

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Problems with MariaDB installation in SME 8.0
« Reply #1 on: January 11, 2014, 02:09:41 PM »
You can keep the system from loading mariadb at boot by deleting /etc/rc.d/rc7.d/S64mariadb:
Code: [Select]
rm -f /etc/rc.d/rc7.d/S64mariadb

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Problems with MariaDB installation in SME 8.0
« Reply #2 on: January 11, 2014, 02:21:17 PM »
I've created a new feature request in Bugzilla where I will be posting the various files that I customized: Bug 8128

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Problems with MariaDB installation in SME 8.0
« Reply #3 on: January 11, 2014, 04:40:15 PM »
mmccarn

why you haven't set up a  page dedicated to the installation of mariadb in the category howto instead of your talk page.

If you are worry that users can broke their system you can set some warnings

Toughts ?

i have seen your bugreport, do you plan to make a rpm ?
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Problems with MariaDB installation in SME 8.0
« Reply #4 on: January 11, 2014, 08:40:25 PM »
LANMonkey -

I found a basic problem with my older install notes that may be causing you headaches.

SME has a copy of "my.cnf" in /etc that contains a line specifying the pid filename, which mariadb seems to pick up on.

I've figured out that I can make mariadb start, stop, and restart much more reliably by specifying pid-file in /opt/mariadb-data/my.cnf, then returning the mysqld_safe command line in /etc/rc.d/init.d/mariadb to the version recommended in the 'side-by-side' howto.



stephdl -

Bugzilla
I've never figured out how to create rpms, so no, I don't plan to do that.

I wanted to create downloadable pre-configured versions of 'my.cnf' and '/etc/rc.d/init.d/mariadb', and I feel it is at least marginally more secure if the files are coming from bugzilla than from the forums or wiki.

Separate Page
I didn't feel that the copy/paste of my raw notes consituted a useful wiki page.  I feel (slightly) more compelled to make things readable on a "real" page compared to my Talk page...

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Problems with MariaDB installation in SME 8.0
« Reply #5 on: January 11, 2014, 09:02:21 PM »
You can keep the system from loading mariadb at boot by deleting /etc/rc.d/rc7.d/S64mariadb:
Code: [Select]
rm -f /etc/rc.d/rc7.d/S64mariadb

That does it.

I'd still like to either completely remove it or get it fixed.  It would be nice to have an alternative to the regular distro of MySQL if some other limitation were to come up.  The upgrade that I found at the previous discussion http://forums.contribs.org/index.php/topic,50433.msg253727.html#msg253727 seems to be working out.

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Problems with MariaDB installation in SME 8.0
« Reply #6 on: January 11, 2014, 10:33:38 PM »
when the wiki page is complete, workable to have a software, make a rpm is quite easy, i, Jpp, or someone else can do this....or you can learn to do it with advices of us.

One example the virtualbox howto made me the life easy to do smeserver-phpvirtualbox. A rpm is just an archive where you put templates, configuration files in it, "nearly" no more, ok some time it is a bit more complicated :)

The purpose of a wiki is to have a collaborative work therefore your talk page is your space, and I don't want to come write in it. I rather prefer a relevant page that we can add our own experience, even if we set the flag "incomplete, developer, WIP" or what you can imagine...

But you can do as you want of course :)

 
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Problems with MariaDB installation in SME 8.0
« Reply #7 on: January 12, 2014, 12:01:59 AM »
...
I'd still like to either completely remove it or get it fixed. ...

Here are some notes that might get it fixed for you.  I believe there was an error in my install notes that was causing problems.

I've updated the notes and moved them to MariaDB alongside MySQL.

I've added a config directive for pid-file to /opt/mariadb-data/my.cnf, which allows me to use the recommended command in /etc/rc.d/init.d/mariadb instead of my customized version.

The commands below will recreate these two files, and will not disrupt any data already stored in mariadb.

When done, you should be able to reliably start and stop mariadb using
/etc/rc.d/initd/mariadb start
/etc/rc.d/initd/mariadb stop


without needing to set it up to start at boot.

Code: (select and paste into ssh to create /opt/mariadb-data/my.cnf) [Select]
'cp' -f /opt/mariadb/support-files/my-medium.cnf /opt/mariadb-data/my.cnf
sed -i -e '/^port.*3306$/ s/= 3306/= 3307/' /opt/mariadb-data/my.cnf
sed -i -e '/^socket.*= \/tmp\/mysql.sock/ s~= /tmp/mysql.sock~= /opt/mariadb-data/mariadb.sock~' /opt/mariadb-data/my.cnf
#
BASEDIR='basedir\t\t= /opt/mariadb'
DATADIR='datadir\t\t= /opt/mariadb-data'
USER='user\t\t= mariadb'
PIDFILE='pid-file\t= /var/run/mariadb/mariadb.pid'
sed -i -e "/^\[mysqld\]$/ s~\[mysqld\]~\[mysqld\]\n$DATADIR\n$BASEDIR\n$USER\n$PIDFILE~" /opt/mariadb-data/my.cnf

Code: (select and paste into ssh to create to create /etc/rc.d/init.d/mariadb) [Select]
'cp' -f /opt/mariadb/support-files/mysql.server /etc/rc.d/init.d/mariadb
sed -i "s~^# Provides: mysql$~# Provides: mariadb~" /etc/rc.d/init.d/mariadb
sed -i "s~^basedir=$~basedir=/opt/mariadb~"          /etc/rc.d/init.d/mariadb
sed -i "s~^datadir=$~datadir=/opt/mariadb-data~"      /etc/rc.d/init.d/mariadb
sed -i "s~lockdir/mysql~lockdir/mariadb~"         /etc/rc.d/init.d/mariadb
sed -i "s~bindir/mysqld_safe\ --datadir~bindir/mysqld_safe\ --defaults-file=/opt/mariadb-data/my.cnf\ --datadir~" /etc/rc.d/init.d/mariadb

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Problems with MariaDB installation in SME 8.0
« Reply #8 on: January 12, 2014, 11:06:46 AM »
Thanks for the howto
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Problems with MariaDB installation in SME 8.0
« Reply #9 on: January 12, 2014, 04:17:50 PM »
Thanks for the howto
pas de quoi (said with a thick american accent...)