MariaDB An enhanced, drop-in replacement for MySQL server.
RHEL/CentOS v7.x shifts from MySQL to MariaDB for its database
management system needs. Type the following yum command to install MariaDB server:

For more info please check:
MariaDB installation_official
install-mariadb-in-linux
install-mariadb-alongside-mysql
MariaDB is a backward compatible, binary drop-in replacement of MySQL. What this means is:
The main motivation behind MariaDB is to provide a floss version of MySQL, in case Oracle goes all corporate with MySQL. It's worth noting that Monty was vocal against MySQL acquisition (via Sun's acquisition) by Oracle.
Although MariaDB is supposed to be compatible with MySQL, for one reason or the other there are quite a few compatibility issues and different features:
To start mariadb, type:sudo yum install mariadb-server mariadb mariadb-libs
To make sure the mariadb service start automatically at the boot time, enter:sudo systemctl start mariadb.service
Sample outputs:sudo systemctl enable mariadb.service
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'To stop/restart and disable mariadb service use the following commands:
sudo systemctl stop mariadb.service #<-- Stop mariadb server sudo systemctl restart mariadb.service #<-- Restart mariadb server sudo systemctl disable mariadb.service #<-- Disable mariadb server sudo systemctl is-active mariadb.service #<-- Is mariadb server running?
Securing MariaDB
Type the following command:Sample outputs:sudo /usr/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): PRESS-ENTER-KEY
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password: YOUR-NEW-PASSWORD-HERE
Re-enter new password: YOUR-NEW-PASSWORD-HERE
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Test MariaDB installation
Type the following commandSample outputs:mysql -u root -p
For more info please check:
MariaDB installation_official
install-mariadb-in-linux
install-mariadb-alongside-mysql
Why should I use MariaDB?
As we all know MySQL is widely used and the most popular RDBMS and first choice of developers. In 2008, MySQL was acquired by Sun Microsystem, which was subsequently bought by Oracle and which is no longer open source.
Well, MariaDB is sponsored by Monty Program AB & MariaDB Foundation and is independently developed by the core developer of MySQL and other community members and truly open source. The man who created MySQL database by Michael “Monty” Widenius, David Axmark, and Allan Larsso the founder of MySQL and Monty Program AB is now behind MariaDB. They would oversee the development of MariaDB foundation.
MariaDB is a backward compatible, binary drop-in replacement of MySQL. What this means is:
In most common practical scenarios, MariaDB version 5.x.y will work exactly like MySQL 5.x.y, MariaDB follows the version of MySQL, i.e. it's version number is used to indicate with which MySQL version it's compatible.
- Data and table definition files (.frm) files are binary compatible.
- All client APIs, protocols and structs are identical.
- All filenames, binaries, paths, ports, sockets, and etc... should be the same.
- All MySQL connectors work unchanged with MariaDB.
- The mysql-client package also works with MariaDB server.
The main motivation behind MariaDB is to provide a floss version of MySQL, in case Oracle goes all corporate with MySQL. It's worth noting that Monty was vocal against MySQL acquisition (via Sun's acquisition) by Oracle.
Although MariaDB is supposed to be compatible with MySQL, for one reason or the other there are quite a few compatibility issues and different features:
- MariaDB includes all popular open source engines, no InnoDB though, XtraDB acts as a drop-in replacement,
- MariaDB claims several speed improvements over MySQL, and
- there are a few new floss extensions that MySQL lacks
Comments
Post a Comment