Centos 7 system installation and configuration MariaDB database

Source: Internet
Author: User
Tags centos


Step 1: Download and install MariaDB

The installation slave database MariaDB is run as a CentOS 7 repo in CentOS. Any lower requirements require you to add additional repository servers. Run the following command on your server:

Yum update-y
Yum install mariadb-server

You may also need to complete the installation by running the following command:

/Usr/bin/mysql_secure_installation

This will install MariaDB and walk through the process of setting your password.
Installation Manual from MariaDB mirror (latest version)
This should be simple. Add the files to be created in/etc/yum. repos. d/and as follows:

[Mariadb]
Name = MariaDB
Base url = http://yum.mariadb.org/10.0/centos7-amd64
Gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Gpgcheck = 1

Once this file is created, run the following command:

Yum update-y
Yum install MariaDB-server MariaDB-client

You can complete the installation by running the following command:

/Usr/bin/mysql_secure_installation

If successful is displayed, proceed to the next step.
Step 2: verify that MariaDB is an operation
If you use CentOS 7 with a custom ISO, you may need to manually start MariaDB and enable it to start on the server. In this way, run:

Systemctl start mariadb. service
Systemctl enable mariadb. service

You can check whether everything is run by executing the following command:

Systemctl is-active mariadb. service

After installation, run mysql-u root-p and enter your password. You will see the output similar to the following:

Welcome to the MariaDB monitor. Commands end with; or \ g.
Your MariaDB connection id is XXXX
Server version: 5.5.X
Copyright (c) 2000,201 4, Oracle, Monty Program AB and others.
Type 'help; 'or' \ H' for help. Type' \ C' to clear the current input statement.
MariaDB [(none)]>

Congratulations, you have installed mariadb on CentOS 7. If you get an error-related connection, make sure that mariadb is running and repeat the second step.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.