Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install MariaDB on Linux system

Shulou Source: shulou.com Published: 2022-06-01 23:08:46 10月24日 Update

Editor to share with you how to install MariaDB Linux system, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

About MariaDB: MariaDB is a branch of MySQL source code, and as Oracle bought Sun,MySQL, it fell into the hands of the king of relational databases.

Separated after realizing what Oracle would do to the MySQL license (MySQL was acquired successively by Sun and Oracle), Michael, the father of MySQL, began another derivative version of MySQL under the name of his daughter Maria; this is the birth of Mariadb.

Mariadb belongs to relational database.

Linux system installation MariaDB detailed steps: step 1: add MariaDB yum repository

1. First, add the YUM configuration file MariaDB.repo file of MariaDB to RHEL/CentOS and Fedora operating systems.

# vi / etc/yum.repos.d/MariaDB.repo according to your operating system version, select the following to add to the end of the file.

Install in CentOS 7

[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey= https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 installed in RHEL 7

[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/rhel7-amd64 gpgkey= https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1

Add MariaDB YUM Warehouse

Step 2: install MariaDB in CentOS 7

2. When the MariaDB warehouse address is added, you can easily install MariaDB with the following command.

# yum install MariaDB-server MariaDB-client-y

Install MariaDB in CentOS 7

3. After the MariaDB package is installed, start the database service daemon immediately, and you can use the following operation settings to start the service automatically after the operating system restarts.

# systemctl start mariadb # systemctl enable mariadb # systemctl status mariadb

Start the MariaDB service in CentOS 7

Step 3: security configuration of MariaDB in CentOS 7

4. Now you can configure the security by setting the root account password for MariaDB, disabling root remote login, deleting the test database and the test account, and finally reloading the permissions using the following command.

# mysql_secure_installation

MySQL Security configuration in CentOS 7

5. After configuring the security configuration of the database, you may want to check the features of MariaDB, such as version number, default parameter list, and login through the MariaDB command line. As follows:

# mysql-V # mysqld-- print-defaults # mysql-u root-p

Check MySQL version information

The above is all the contents of the article "how to install MariaDB in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: System configuration data database security version faceted Zhongan operating system warehouse content can pass commands files articles services check test login one line Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info Shulou Technology Docker MariaDB