Linux HOWTOs

About | Home | Search

HOWTO: mariadb
Description: SQL database server from the original developers of MySQL
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# MariaDB
# =======
# As of Slackware-current 2013-03-23, Slackware switched from MySQL to
# MariaDB.  See the Wikipedia article for the story on why MySQL split
# in to itself and MariaDB.

# Slackware 14.1: mariadb 5.5.32
# Slackware 14.2: mariadb 10.0.26

# If you want a web GUI for MySQL administration, you may want to look at
# phpMyAdmin

# MariaDB Documentation:
# - Build Environment Setup for Linux
# - Generic Build Instructions
# - Starting and Stopping MariaDB Automatically
# - mysqld Configuration Files and Groups
# - Copying Tables Between Different MariaDB Databases and MariaDB Servers
# - Backing Up and Restoring Databases

# If you are migrating from another machine, be sure to (drink your Ovaltine)
# read "Copying Tables Between Different MariaDB Databases and MariaDB
# Servers" - link above.

# If you're installing MariaDB to use with PHP, as of the
# time that these were all the latest major version (7.0, 7.1, 7.2) release:
# PHP 7.0.32
# PHP 7.1.24
# PHP 7.2.12
# ...none of them will build PHP mysqli if MariaDB >= 10.2.10 or 10.3.x are
# installed.
# Either dig in to more info and a patch that fixes some, but not all, of
# the issues:
# or just use mysqlnd instead.

# Separate HOWTOs for major versions:
# MariaDB 10.1
# MariaDB 10.2
# MariaDB 10.3

# After you install MariaDB itself, come back here if you need to
# install Perl modules
# I use notest for DBD::mysql because it does not know your MariaDB
# password when installed through CPAN, so test will fail - install it
# from source ( if you want
# the tests
su -c "perl -MCPAN -e shell"
o conf make_install_arg UNINST=1
o conf prerequisites_policy follow
install Bundle::CPAN
install Bundle::DBI
notest install DBD::mysql

# If you ever want to uninstall MariaDB, back up everything, then
# do this to zap everything:
test -x /etc/init.d/mysql && /etc/init.d/mysql stop
test -x /etc/rc.d/rc.mysqld && /etc/rc.d/rc.mysqld stop
killall mysqld
sleep 2
killall -9 mysqld
test -d src/mariadb-* &&
 ( cd src/mariadb-*
   test -f build-mariadb/install_manifest.txt &&
    cat build-mariadb/install_manifest.txt | xargs rm )
rm -f /etc/my.cnf /etc/mysqlaccess.conf /etc/init.d/mysql \
 /etc/logrotate.d/mysql /etc/profile.d/ /etc/rc.d/rc.mysql \
 /etc/rc.d/rc.mysqld /usr/libexec/mysqld \
test -d /etc/my.cnf.d && rm -r /etc/my.cnf.d
find /usr/doc -maxdepth 1 -type d -name "mariadb-*" -exec rm -r {} \;
test -d /usr/include/mysql && rm -r /usr/include/mysql
( cd /usr/lib ; rm -f libmysqld.* libmysqlclient.* libmysqlservices.* )
test -d /usr/lib64 &&
 ( cd /usr/lib64 ; rm -f libmysqld.* libmysqlclient.* libmysqlservices.* )
test -d /usr/lib/mysql && rm -r /usr/lib/mysql
test -d /usr/lib64/mysql && rm -r /usr/lib64/mysql
test -d /usr/local/mysql && rm -r /usr/local/mysql
test -d /usr/share/mysql && rm -r /usr/share/mysql
test -d /var/lib/mysql && rm -r /var/lib/mysql
test -d /var/run/mysql && rm -r /var/run/mysql
find ~/src -maxdepth 1 -type d -name "mariadb-*" -exec rm -r {} \;
rm -f ~/installed/mariadb-*.tar.*

Back to the list

Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>