Installation and setup of MariaDB: Versions of MySQL after its own by Oracle became worse and worse. Constant falls and errors in the tables had a bad effect on the availability of sites, then it was decided to switch to MariaDB.

The result completely justified itself, MariaDB is very stable and well optimized. Three-year uptime without interruptions on several servers perfectly proves this.

Selecting the version of MariaDB

maria db

There are 2 branches of MariaDB – 5.x and 10.x.

5.x are versions that are as close to MySQL as the latest versions, they are fully compatible with MySQL. If you just go to MariaDB with MySQL – this version line is for you.

10.x – a new line of versions, which began after version 5.5. These versions do not completely copy all the new features of the latest versions of MySQL, but they contain their unique functions. They are still compatible with MySQL, but if you are just starting to use MariaDB, it’s better to start with version 5.5.

Installing MariaDB on a Linux server

MariaDB distributions are usually not found in the repositories of the major Linux distributions (for example, in CentOS 6 and CentOS 7). But, even if it were, it’s better to install MariaDB’s native repository in the system to always have the latest versions. To install the yum repository, follow the instructions:

1. Create a new repository file with the command:

vi /etc/yum.repos.d/MariaDB.repo

Press the I key to enter edit mode for the vi editor.

2. Obtain the file text for your version of the Linux distribution using this link. You will need to select the name of the distribution, its version, and bit depth:

mariadb

 

Copy the text for the repository file, paste it into your file, and press “: wq” to exit the vi editor with saving.

Now you can install MariaDB Server and the environment programs with yum:

YUM INSTALL MARIADB-SERVER MARIADB-CLIENT

Libraries for various programming languages can be installed for MySQL, they are fully compatible. For example, for PHP:

yum install php-mysql

Now you need to run the installed MariaDB server and go to its configuration:

SERVICE MYSQL START

If you did everything correctly, you will see the following message:

command2

Setting up MariaDB

To get started with MariaDB, you need to set the root password. In detail about tuning and optimization of the database, I’ll tell you in a special article, these are not the first things.

Initial installation of MySQL password root:

The easiest way to set the root password is to use a special script, it is included in the MariaDB distribution:

/ usr / bin / mysql_secure_installation

Follow the instructions and set the root password.

If you still have questions or need clarifications – please ask or leave a comment.

I’m always happy to help!

Good luck!

Shares:
Show Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

3 × two =