LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware: Replace MySQL with MariaDB on fresh installation. (http://www.linuxquestions.org/questions/slackware-14/slackware-replace-mysql-with-mariadb-on-fresh-installation-932300/)

astanton 03-02-2012 04:25 AM

Slackware: Replace MySQL with MariaDB on fresh installation.
 
This is a Mini-HowTo or procedural tutorial on installing MariaDB seamlessly and effortlessly:

The Question: On a fresh installation of Slackware Linux, how do I swap out and replace MySQL for MariaDB?

Here are the steps in order to affect a complete replacement of MySQL with MariaDB on Slackware Linux, and then initialize and start the mysql (MariaDB) daemon.

1.) We begin by selecting a mirror from /etc/slackpkg/mirrors. This is a good one to use, but YMMV:

Code:

http://mirrors.usc.edu/pub/linux/distributions/slackware/slackware64-current/
2.) We add the following to /etc/slackpkg/blacklist:

Code:

kernel-firmware
kernel-generic
kernel-generic-smp
kernel-headers
kernel-huge
kernel-huge-smp
kernel-modules
kernel-modules-smp
kernel-source
aaa_elflibs
mysql
#[0-9]+_SBo

3.) Now we remove MySQL:

Code:

# removepkg mysql
4.) Now we install MariaDB and update everything:

Code:

# sbopkg -i libevent
# sbopkg -i mariadb
# slackpkg update
# slackpkg update gpg
# slackpkg install-new
# slackpkg upgrade-all

# mysql_install_db --user=mysql
# chmod +x /etc/rc.d/rc.mysqld
# /etc/rc.d/rc.mysqld start
# /usr/bin/mysql_secure_installation

...and you're all done! :)

Also, the SBo has the following to say about installing MariaDB:

Quote:

If you want to build the embedded mysql server (libmysqld), which
you will need if you plan to (re)build amarok, then run the script
with EMBEDDED=yes in the environment, but be aware that because
mariadb builds this as shared library, applications linking it
will no longer work with Slackware's mysql package.
Does one need to build libmysqld from the MariaDB SBo too for any other purpose than if they wanted to rebuild amarok for some reason?

Please offer any and all thoughts or corrections you may have.

willysr 03-02-2012 04:39 AM

this code should be split into two commands
Code:

chmod +x /etc/rc.d/rc.mysqld start
Code:

chmod +x /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld start


astanton 03-02-2012 07:14 AM

Oh hey yeah I fixed that per your observation, and it looks like it's ready to go! Thanks :)

slakmagik 03-02-2012 02:29 PM

You can join these two commands.

Code:

# sbopkg -i libevent
# sbopkg -i mariadb

Not that it matters - running two instances of sbopkg isn't exactly the bottleneck in building multiple packages ;) - but just noting that you can install multiple properly ordered packages either with -i "pkg1 pkg2" or with -i pkg1 -i pkg2.

ppr:kut 03-03-2012 03:37 AM

Quote:

Does one need to build libmysqld from the MariaDB SBo too for any other purpose than if they wanted to rebuild amarok for some reason?
The argument holds for basically anything that links libmysqld, amarok is the most prominent example. I'm sure there are others too, but not in stock Slackware and probably neither on Slackbuilds.org


All times are GMT -5. The time now is 04:44 PM.