Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure MariaDB quickly under CentOS7

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to configure MariaDB quickly under CentOS7". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to quickly configure MariaDB under CentOS7.

MariaDB database management system is a branch of MySQL and is mainly maintained by the open source community. The purpose of licensing MariaDB with GPL is to be fully compatible with MySQL, including API and the command line, making it an easy replacement for MySQL.

Step 1: add a 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

Depending on your operating system version, select the appropriate content below 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

Install 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

At this point, I believe you have a deeper understanding of "how to quickly configure MariaDB under CentOS7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report