Suresh
July 28, 2015
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. You can use the link to know more about MariaDB and its features. If you want to try MariaDB without losing MySQL, then here is the tutorial for running MariaDB alongside MySQL.
Let's start with the steps to install MariaDB along with Mysql
[root@knackforge opt]# mkdir mariadb-data
[root@knackforge opt]# ln -s mariadb-10.0.20-linux-i686 mariadb [root@knackforge opt]# ls -al total 32 lrwxrwxrwx 1 root root 26 Jun 24 10:06 mariadb -> mariadb-10.0.20-linux-i686 drwxr-xr-x 12 mariadb mariadb 4096 Jun 24 10:05 mariadb-10.0.20-linux-i686 drwxr-xr-x 9 mariadb mariadb 4096 Jun 24 09:42 mariadb-data
[root@knackforge opt]# groupadd --system mariadb [root@knackforge opt]# useradd -c "MariaDB User" -d /opt/mariadb -g mariadb --system mariadb [root@knackforge opt]# chown -R mariadb:mariadb mariadb-10.0.20-linux-i686/ [root@knackforge opt]# chown -R mariadb:mariadb mariadb-data/
[root@knackforge opt]# cp mariadb/support-files/my-medium.cnf mariadb-data/my.cnf [root@knackforge opt]# chown mariadb:mariadb mariadb-data/my.cnf
[client] port = 3307 socket = /opt/mariadb-data/mariadb.sock [mysqld] datadir = /opt/mariadb-data basedir = /opt/mariadb port = 3307 socket = /opt/mariadb-data/mariadb.sock user = mariadb
[root@knackforge opt]# cp mariadb/support-files/mysql.server /etc/init.d/mariadb [root@knackforge opt]# chmod +x /etc/init.d/mariadb
- # Provides: mysql + # Provides: mariadb - basedir= + basedir=/opt/mariadb - datadir= + datadir=/opt/mariadb-data - lock_file_path="$lockdir/mysql" + lock_file_path="$lockdir/mariadb"
# Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. $bindir/mysqld_safe --defaults-file=/opt/mariadb-data/my.cnf --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
wait_for_ready () { [...] if $bindir/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf ping >/dev/null 2>&1; then
[root@knackforge opt]# cd mariadb [root@knackforge mariadb]# scripts/mysql_install_db --defaults-file=/opt/mariadb-data/my.cnf
[root@mariadb-near-mysql opt]# /etc/init.d/mariadb start Starting MySQL... [ OK ]
[root@knackforge opt]# cd /etc/init.d [root@knackforge init.d]# chkconfig --add mariadb [root@knackforge init.d]# chkconfig --levels 3 mariadb on
[root@knackforge ~]# mysql -e "SELECT VERSION();" 5.5.32 [root@knackforge ~]# mysql -e "SELECT VERSION();" --socket=/opt/mariadb-data/mariadb.sock 10.0.20
Just like how your fellow techies do.
We'd love to talk about how we can work together
Take control of your AWS cloud costs that enables you to grow!