[MariaDB]: Overview & Installation

MariaDB is a drop-in replacement for MySQL.

MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server.
To accomplish this, the MariaDB Foundation work closely and cooperatively with the larger community of users and developers in the true spirit of Free and open source software, and release software in a manner that balances predictability with reliability.

 

mariadb_enterprise_architecture_MySQL_Friendly_v5
About MariaDB Corporation :
====================

MariaDB Corporation Ab (formerly SkySQL) is a global software vendor specializing in high availability and high performance MariaDB & MySQL. With its head office in Espoo, Finland and team members circling the globe, MariaDB has over 500 customers in more than 30 countries worldwide.

Our client base consists of global brands such Google, Fusion-io, HP, Virgin Mobile, Craigslist, Harvard University and numerous small to medium businesses, MariaDB is perfectly suited to help with any of your data needs.

MariaDB products and professional services bring ease of use and assistance 24/7, while providing an effective way to increase database productivity, reduce downtime, augment existing resources and prevent vendor lock in.

SkySQL was founded in 2010 by the same team behind MySQL AB, including David Axmark, Michael ‘Monty’ Widenius and Kaj Arnö. The company merged with Monty Program in 2013. SkySQL changed its name to MariaDB Corporation in Fall 2014.

You can download MariaDB 10.x.x from below link.

https://downloads.mariadb.org/mariadb/10.0.15/
To install the binaries, unpack the distribution into the directory of your choice and run the mysql_install_db script.

In the example below we install MariaDB in the “/usr/local/mysql” directory (this is the default location for MariaDB for many platforms). However any other directory should work too.

We install the binary with a symlink to the original name. This is done so that you can easily change MariaDB versions just by moving the symlink to point to another directory.
Installing MariaDB as not root in any directory :

====================

Below, change /usr/local to the directory of your choice.

cd /usr/local
gunzip < /path-to/mariadb-VERSION-OS.tar.gz | tar xf –
ln -s mariadb-VERSION-OS mysql
cd mysql
./scripts/mysql_install_db –defaults-file=~/.my.cnf

[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]# tar -zxvf mariadb-10.0.15-linux-x86_64.tar.gz
mariadb-10.0.15-linux-x86_64/README
mariadb-10.0.15-linux-x86_64/CREDITS
mariadb-10.0.15-linux-x86_64/COPYING
mariadb-10.0.15-linux-x86_64/COPYING.LESSER
mariadb-10.0.15-linux-x86_64/EXCEPTIONS-CLIENT
mariadb-10.0.15-linux-x86_64/INSTALL-BINARY
mariadb-10.0.15-linux-x86_64/include/mysql/private/pcre.h

————————————————–

mariadb-10.0.15-linux-x86_64/man/man1/mysqltest_embedded.1
mariadb-10.0.15-linux-x86_64/man/man1/mysql_client_test_embedded.1
mariadb-10.0.15-linux-x86_64/man/man8/mysqld.8
[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]# ll -lhtr
total 293M
-rw-r–r– 1 root root 293M Dec 1 06:46 mariadb-10.0.15-linux-x86_64.tar.gz
drwxr-xr-x 12 root root 4.0K Dec 1 06:47 mariadb-10.0.15-linux-x86_64
[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]# ln -s mariadb-10.0.15-linux-x86_64 /usr/local/mysql
[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]# ll -lhtr /usr/local/mysql
lrwxrwxrwx 1 root root 28 Dec 1 06:49 /usr/local/mysql -> mariadb-10.0.15-linux-x86_64
[root@dbversitydotcom 6]#
[root@dbversitydotcom 6]# cd mariadb-10.0.15-linux-x86_64
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# ll -lhtr
total 208K
-rw-r–r– 1 bob bob 1.6K Nov 21 16:02 CREDITS
-rw-r–r– 1 bob bob 89K Nov 21 16:02 README
-rw-r–r– 1 bob bob 8.5K Nov 21 16:02 INSTALL-BINARY
-rw-r–r– 1 bob bob 8.1K Nov 21 16:02 EXCEPTIONS-CLIENT
-rw-r–r– 1 bob bob 26K Nov 21 16:02 COPYING.LESSER
-rw-r–r– 1 bob bob 18K Nov 21 16:02 COPYING
drwxr-xr-x 3 root root 4.0K Dec 1 06:47 include
drwxr-xr-x 3 root root 4.0K Dec 1 06:47 data
drwxr-xr-x 4 root root 4.0K Dec 1 06:47 man
drwxr-xr-x 3 root root 4.0K Dec 1 06:48 lib
drwxr-xr-x 11 root root 4.0K Dec 1 06:48 mysql-test
drwxr-xr-x 28 root root 4.0K Dec 1 06:48 share
drwxr-xr-x 2 root root 4.0K Dec 1 06:48 bin
drwxr-xr-x 2 root root 4.0K Dec 1 06:48 scripts
drwxr-xr-x 3 root root 4.0K Dec 1 06:48 support-files
drwxr-xr-x 4 root root 4.0K Dec 1 06:48 sql-bench
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# ./scripts/mysql_install_db –user=mysql
Installing MariaDB/MySQL system tables in ‘./data’ …
141201 6:51:39 [Note] InnoDB: Using mutexes to ref count buffer pool pages
141201 6:51:39 [Note] InnoDB: The InnoDB memory heap is disabled
141201 6:51:39 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
141201 6:51:39 [Note] InnoDB: Memory barrier is not used
141201 6:51:39 [Note] InnoDB: Compressed tables use zlib 1.2.3
141201 6:51:39 [Note] InnoDB: Using Linux native AIO
141201 6:51:39 [Note] InnoDB: Not using CPU crc32 instructions
141201 6:51:39 [Note] InnoDB: Initializing buffer pool, size = 2.0G
141201 6:51:39 [Note] InnoDB: Completed initialization of buffer pool
141201 6:51:40 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
141201 6:51:40 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
141201 6:51:40 [Note] InnoDB: Database physically writes the file full: wait…
141201 6:51:40 [Note] InnoDB: Setting log file ./ib_logfile101 size to 512 MB
InnoDB: Progress in MB: 100 200 300 400 500
141201 6:51:48 [Note] InnoDB: Setting log file ./ib_logfile1 size to 512 MB
InnoDB: Progress in MB: 100 200 300 400 500
141201 6:51:56 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
141201 6:51:56 [Warning] InnoDB: New log files created, LSN=45781
141201 6:51:56 [Note] InnoDB: Doublewrite buffer not found: creating new
141201 6:51:56 [Note] InnoDB: Doublewrite buffer created
141201 6:51:56 [Note] InnoDB: 128 rollback segment(s) are active.
141201 6:51:56 [Warning] InnoDB: Creating foreign key constraint system tables.
141201 6:51:56 [Note] InnoDB: Foreign key constraint system tables created
141201 6:51:56 [Note] InnoDB: Creating tablespace and datafile system tables.
141201 6:51:56 [Note] InnoDB: Tablespace and datafile system tables created.
141201 6:51:56 [Note] InnoDB: Waiting for purge to start
141201 6:51:56 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.21-70.0 started; log sequence number 0
141201 6:52:00 [Note] InnoDB: FTS optimize thread exiting.
141201 6:52:00 [Note] InnoDB: Starting shutdown…
141201 6:52:02 [Note] InnoDB: Shutdown completed; log sequence number 1616697
OK
Filling help tables…
141201 6:52:02 [Note] InnoDB: Using mutexes to ref count buffer pool pages
141201 6:52:02 [Note] InnoDB: The InnoDB memory heap is disabled
141201 6:52:02 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
141201 6:52:02 [Note] InnoDB: Memory barrier is not used
141201 6:52:02 [Note] InnoDB: Compressed tables use zlib 1.2.3
141201 6:52:02 [Note] InnoDB: Using Linux native AIO
141201 6:52:03 [Note] InnoDB: Not using CPU crc32 instructions
141201 6:52:03 [Note] InnoDB: Initializing buffer pool, size = 2.0G
141201 6:52:03 [Note] InnoDB: Completed initialization of buffer pool
141201 6:52:04 [Note] InnoDB: Highest supported file format is Barracuda.
141201 6:52:04 [Note] InnoDB: 128 rollback segment(s) are active.
141201 6:52:04 [Note] InnoDB: Waiting for purge to start
141201 6:52:04 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.21-70.0 started; log sequence number 1616697
141201 6:52:05 [Note] InnoDB: FTS optimize thread exiting.
141201 6:52:05 [Note] InnoDB: Starting shutdown…
141201 6:52:07 [Note] InnoDB: Shutdown completed; log sequence number 1616707
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

‘./bin/mysqladmin’ -u root password ‘new-password’
‘./bin/mysqladmin’ -u root -h dbversitydotcom password ‘new-password’

Alternatively you can run:
‘./bin/mysql_secure_installation’

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd ‘.’ ; ./bin/mysqld_safe –datadir=’./data’

You can test the MariaDB daemon with mysql-test-run.pl
cd ‘./mysql-test’ ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
SkySQL Ab. You can contact us about this at sales@skysql.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/

[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# cd ‘.’ ; ./bin/mysqld_safe –datadir=’./data’
141201 06:57:24 mysqld_safe unknown option ‘–skip-show-database=1’
141201 06:57:24 mysqld_safe unknown option ‘–log-warnings=2’
141201 06:57:24 mysqld_safe unknown option ‘–general-log=1’
141201 06:57:24 mysqld_safe unknown option ‘–general-log-file==/var/log/general_query.log’
141201 06:57:24 mysqld_safe unknown option ‘–secure-auth=on’
141201 06:57:24 mysqld_safe unknown option ‘–local-infile=0’
141201 06:57:24 mysqld_safe Logging to ‘/var/log/mysqld.log’.
141201 06:57:24 mysqld_safe Starting mysqld daemon with databases from ./data
141201 06:57:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# chown -R root .
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# ll -lhtr
total 208K
-rw-r–r– 1 root bob 1.6K Nov 21 16:02 CREDITS
-rw-r–r– 1 root bob 89K Nov 21 16:02 README
-rw-r–r– 1 root bob 8.5K Nov 21 16:02 INSTALL-BINARY
-rw-r–r– 1 root bob 8.1K Nov 21 16:02 EXCEPTIONS-CLIENT
-rw-r–r– 1 root bob 26K Nov 21 16:02 COPYING.LESSER
-rw-r–r– 1 root bob 18K Nov 21 16:02 COPYING
drwxr-xr-x 3 root root 4.0K Dec 1 06:47 include
drwxr-xr-x 4 root root 4.0K Dec 1 06:47 man
drwxr-xr-x 3 root root 4.0K Dec 1 06:48 lib
drwxr-xr-x 11 root root 4.0K Dec 1 06:48 mysql-test
drwxr-xr-x 28 root root 4.0K Dec 1 06:48 share
drwxr-xr-x 2 root root 4.0K Dec 1 06:48 bin
drwxr-xr-x 2 root root 4.0K Dec 1 06:48 scripts
drwxr-xr-x 3 root root 4.0K Dec 1 06:48 support-files
drwxr-xr-x 4 root root 4.0K Dec 1 06:48 sql-bench
drwxr-xr-x 5 root root 4.0K Dec 1 06:57 data
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# chown -R mysql data
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
To start mysqld you should now do:

./bin/mysqld_safe –defaults-file=~/.my.cnf &

[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# ./bin/mysqld_safe –user=mysql &
[1] 19029
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# 141201 06:59:35 mysqld_safe unknown option ‘–skip-show-database=1’
141201 06:59:35 mysqld_safe unknown option ‘–log-warnings=2’
141201 06:59:36 mysqld_safe unknown option ‘–general-log=1’
141201 06:59:36 mysqld_safe unknown option ‘–general-log-file==/var/log/general_query.log’
141201 06:59:36 mysqld_safe unknown option ‘–secure-auth=on’
141201 06:59:36 mysqld_safe unknown option ‘–local-infile=0’
141201 06:59:36 mysqld_safe Logging to ‘/var/log/mysqld.log’.
141201 06:59:36 mysqld_safe Starting mysqld daemon with databases from /data/6/mariadb-10.0.15-linux-x86_64/data
141201 06:59:41 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

[1]+ Done ./bin/mysqld_safe –user=mysql
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# export PATH=$PATH:/usr/local/mysql/bin/
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#

Auto start of mysqld
You can get mysqld (the MariaDB server) to autostart by copying the file mysql.server file to the right place.

[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]# cp support-files/mysql.server /etc/init.d/mysql.server
[root@dbversitydotcom mariadb-10.0.15-linux-x86_64]#

Stay tune to more posts for MariaDB related

  • Ask Question