LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-02-2012, 03:25 AM   #1
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Rep: Reputation: 5
Question 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.

Last edited by astanton; 03-02-2012 at 09:07 AM. Reason: edit corrected start as per Willy
 
Old 03-02-2012, 03:39 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
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
 
Old 03-02-2012, 06:14 AM   #3
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
Thumbs up

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

Last edited by astanton; 03-02-2012 at 08:57 AM.
 
Old 03-02-2012, 01:29 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 03-03-2012, 02:37 AM   #5
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
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
 
  


Reply

Tags
database, mysql, slackware -current, slackware64



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fresh installation of Slackware 13 -64 and Slackbuilds/sbopkg arubin Slackware 6 11-09-2009 01:31 PM
Problem running HAL on fresh Slackware 12.1 installation on P1510 olefiver Slackware 3 08-19-2008 04:04 PM
Problem Starting MySQL on Fresh Fedora 8 Install w/ Yum'd MySQL blong4life Linux - Server 2 07-04-2008 07:44 PM
How to add Hebrew support in fresh Slackware 10.0 installation? yonatan1 Slackware 8 10-04-2005 03:36 PM
Slackware 9.1 Fresh Installation «X» problems linux-back Linux - Newbie 1 11-07-2003 04:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration