What is MariaDB, How to Install it on Ubuntu 14.04
MariaDB is an RDBMS (Relational Database Management System), developed by forking from MySQL.
Sun bought MySQL, and then Oracle acquired Sun. It indicated that Oracle’s decisions would shape MySQL from then on. Initial developers of MySQL forked MySQL while under the roof of “Monty AB” and developed it as free software. The journey has continued with the new name MariaDB.
Features at a Glance:
* It is licensed with the GNU General Public License.
* Monty Widenius, the creator of MySQL, named her second daughter after MariaDB. (Monty’s first daughter’s name is My.)
* There is community support behind all improvements and maintenance.
* MariaDB, which is a replication of MySQL, recognizes all MySQL commands and supports MySQL interface methods. Both libraries share standard codes.
* Google, English Wikipedia, and WordPress use MariaDB.
– Faster and secure replication with “group commit” (ACID)
– No unnecessary character encoding transformations; increased speed
– Plug-in validation structure
– Virtual and there is a dynamic column for each row
– Comprehensive user statistics
Other MySQL Forks
– Drizzle: Aims a smaller, lighter and faster MySQL for cloud
– Percona: One-to-one compatible with MySQL, aims for better statistics, performance, and stability
– OurDelta: A patch set for MySQL and MariaDB
Installing MariaDB on Ubuntu 14.04:
Firstly, we need to install the software-properties-common package for MariaDB.
$sudo apt-get install software-properties-common
Then we need to add the key to MariaDB’s package repository.
$sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:800xcbcb082a1bb943db
Afterward, we need to add MariaDB’s package repository.
$sudo add-apt-repository ‘deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntutrusty main’
We should update our local package repository.
$sudo apt-get update
Now we can download the package.
$sudo apt-get install mariadb-server
To create the MariaDB structure, we should stop the running MySQL and then say “mysql_install_db”. Let’s restart.
$sudo service mysql stop
$sudo service mysql start
After the structure is created, we should say “mysql_secure_installation” to create test tables and anonymous users. We should then do configurations according to the few questions in the command output.
“”””””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):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.
You already have a root password set, so you can safely answer ‘n’.
Change the root password? [Y/n] y
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
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.
It is intended only for testing, and to make the installation go a bit smoother. You should remove those before moving into a production environment.
Remove anonymous users? [Y/n]
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]
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]
– Dropping test database…
– Removing privileges on test database…
Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n]
All done! If you’ve completed all of the above steps, your MariaDB installation should now be secure.
Thanks for using MariaDB!”””””””
To check the MariaDB version:
To connect to the MariaDB console:
To see what we can do with MariaDB:
** You can check MariaDB projects from here.