Steps for installing the MariaDB database in CentOS 7

Source: Internet
Author: User
Tags centos

MariaDB is a branch of MySQL. It was developed by the father of MySQL. Since its acquisition by Oracle, MySQL has been updated slowly and has a tendency to close the source. Major companies have switched to Mariadb, including Facebook and Google.


My website runs in the PHP 7 environment of CentOS 7. Try MariaDB. If Mysql is installed, uninstall it first. Otherwise, it will conflict with MariaDB.

Follow these steps to install the MariaDB database on CentOS 7:

1. Create a new yum source

Command: vim/etc/yum. repos. d/MariaDB. repo

The content is as follows:


# MariaDB 10.1 CentOS repository list-created 2016-02-21 14:46 UTC
# Http://mariadb.org/mariadb/repositories/
[Mariadb]
Name = MariaDB
Base url = http://yum.mariadb.org/10.1/centos7-amd64
Gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Gpgcheck = 1

2. Install MariaDB using yum

Run the following command:


Sudo yum install MariaDB-server MariaDB-client

Then install it all the way.

3. Start MariaDB

Command: service mariadb restart

If the prompt "Redirecting to/bin/systemctl restart mariadb. service" is displayed, it is started successfully.

4. Test MariaDB

The local machine enters the mysql-u root-p command on the terminal and then enters the password to log on to the database. This is the same as mysql. You must first set the database user name and password, in this step, you can search online.

MariaDB [(none)]> show databases;
+ ------- +
| Database |
+ ------- +
| Information_schema |
| Mysql |
| Performance_schema |
| Tanteng. me |
+ ------- +
4 rows in set (0.03 sec)

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.