- Show all Docs ( 5 ) Collapse Docs
- Show all Docs ( 309 ) Collapse Docs
- Show all Docs ( 1 ) Collapse Docs
- Show all Docs ( 31 ) Collapse Docs
HOW TO INSTALL MARIADB 10.3 ON CENTOS 7
The MariaDB server is a MySQL server fork developed by the community. MariaDB is developed as a drop-in replacement for MySQL(r), with new features , new storage engines, fewer bugs and better performance by core members of the original MySQL team. For databases professionals who want a robust , scalable and reliable SQL server, MariaDB can be a better choice.
Add MariaDB Yum Repository
[root@Microhost ~]# vi /etc/yum.repos.d/mariadb.repo
The above command will open a blank file . Please copy and paste the content given below:
[mariadb] name=MariaDB baseurl=http://yum.mariadb.org/10.3/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 enabled=1
Press the Esc button and exit with :wq
We need to import the public GPG key to verify the digital signatures of the packages in this repository before using the MariaDB andum repository.
However, the GPG public key does not need to be manually imported. When we first install a package from MariaDB yum repository, the public GPG key will be automatically installed by yum.
Here, for the sake of demonstration, we manually import the GPG public key.
[root@Microhost ~]# rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
We will move to the installation section. You can use the following command to install mariaDB.
[root@Microhost ~]# yum install -y mariadb-server
Now, MariaDB has been installed successfully. We can start and enable the service of MariaDB.
[root@Microhost ~]# systemctl start mariadb
[root@Microhost ~]# systemctl enable mariadb
We will move to the secure installation of MariaDB. The command is given below to initiate the process.
[root@Microhost ~]# mysql_secure_installation
Press "enter" to set new password for MariaDB root, as shown in the above screenshot.
Now, You will get the prompt of the removal of anonymous User. You need to press "y" as per the image given below:
In the next prompt, you have to disable the root login of mariadb. You need to press "y" as per the image given below:
Now, the prompt would be shown for the removal of test databases. You need to press "y" as per the image given below:
In the last prompt, You will press "y" to reload the table privileges as shown in image below:
We have done with the configuration and secure installation portion of MariaDB.
We will use the below command for login into database:
[root@Microhost ~]# mysql -u root -p
We have completed the section for installation and configuration of MariaDB.
Thank You 🙂