CentOS 7.2 Installation mariadb detailed process _linux

Source: Internet
Author: User
Tags phpmyadmin

MARIADB Introduction

MARIADB database management System is a branch of MySQL, mainly by the open source community in the maintenance, the use of GPL licensed license MARIADB is fully compatible with MySQL, including APIs and command line, so that it can easily become a replacement for MySQL. On the storage engine side, use XTRADB (English: xtradb) to replace the MySQL InnoDB. MARIADB, led by MySQL founder Michael Widenius (English: Michael Widenius), had previously sold his company, MySQL AB, to Sun at a price of 1 billion dollars, and since then, as Sun was acquired by Oracle, MySQL's ownership also falls into Oracle's hands. The name of MARIADB is from the name of Michael Widenius's daughter Maria.
MARIADB Official website: https://mariadb.org/
MARIADB Download: https://downloads.mariadb.org/
MARIADB GitHub Address: Https://github.com/MariaDB/server

Install MARIADB 5.5

Installation MARIADB 5.5 is the default version of CentOS 7, configuring the database server

[root@linuxprobe~]# yum-y install Mariadb-server
[root@linuxprobe~]# vi/etc/my.cnf
# Add follows within [ MYSQLD] section
[mysqld]
Character-set-server=utf8
[root@linuxprobe~]# systemctl start mariadb
[ root@linuxprobe~]# systemctl enable mariadb
ln-s '/usr/lib/systemd/system/mariadb.service '/etc/systemd/system /multi-user.target.wants/mariadb.service '

Initialize MARIADB

Copy Code code as follows:
[root@linuxprobe~]# mysql_secure_installation #和MySQL一样, all the way y

Connect mariadb

[Root@linuxprobe ~]# mysql-u root-p Enter password:welcome to the MARIADB Monitor. Commands End With;
or \g. Your mariadb Connection ID is 1023 server version:5.5.50-mariadb mariadb server Copyright (c), 2016, Oracle, Mariad

B Corporation Ab and others. Type ' help, ' or ' \h ' for help.

Type ' \c ' to clear the current input statement.
MARIADB [(None)]> select User,host,password from Mysql.user; +-----------+-----------+-------------------------------------------+
| user | Host |
password | +-----------+-----------+-------------------------------------------+
| Root | localhost | *f1dae8bcdfca7a57f246e0f834ac35830a3d640e | | Root | 127.0.0.1 | *f1dae8bcdfca7a57f246e0f834ac35830a3d640e | | Root | :: 1 |
*f1dae8bcdfca7a57f246e0f834ac35830a3d640e | +-----------+-----------+-------------------------------------------+ 5 rows in Set (0.00 sec) Mariadb [(None)]>
show databases; +--------------------+
|
Database | +--------------------+
| Information_schema | | MySQL | | PErformance_schema |
+--------------------+ 5 rows in Set (0.05 sec) mariadb [(none)]> exit;

 Bye

Firewall opens Port 3306

# Client Settings
[root@vdevops ~]# firewall-cmd--add-service=mysql--permanent
Success
[Root@vdevops ~]# Firewall-cmd--reload
Success

Install phpMyAdmin

Prerequisites for installing the Web server and PHP, refer to the following:

Http://www.jb51.net/article/97434.htm

Http://www.jb51.net/article/97587.htm

Install phpMyAdmin

 # Install from Epel
[root@linuxprobe~]# yum--enablerepo=epel-y install phpmyadmin php-mysql php-mcrypt
[ root@linuxprobe~]# vi/etc/httpd/conf.d/phpmyadmin.conf
# line 17:IP address your permit to access
Require IP 12 7.0.0.1 10.1.1.0/24
# line 34:IP addresses you permit to access
Require IP 127.0.0.1 10.1.1.o/24
[root@linux Probe ~]# systemctl Restart httpd

Use a Web browser to access "http://(your hostname or IP address)/phpMyAdmin/" From the client, and then log on to MARIADB users on the following screen. This example uses the root user to continue.

After you log in, you can operate mariadb here

MARIADB Master Copy

MARIADB master copy and MySQL master-slave Copy the same, please go to: http://www.jb51.net/article/97412.htm

Install MARIADB 10.1

Configure CentOS Sclo Source Warehouse

Copy Code code as follows:
[Root@linuxprobe ~]# yum--enablerepo=centos-sclo-rh-y install Rh-mariadb101-mariadb-server

Packages from CENTOS-SCLO-RH are installed in the/OPT directory. To use it, load environment variables as follows.

[Root@linuxprobe ~]# SCL enable rh-mariadb101 bash 
[root@linuxprobe ~]# mysql-v
mysql Ver 15.1 distrib \ 10.1.14-ma RIADB, for Linux (x86_64) using Editline wrapper
[root@linuxprobe ~]# which MySQL
/opt/rh/rh-mariadb101/root/ Usr/bin/mysql

If you want to automatically enable MARIADB 10.1 at logon, configure the following

[Root@linuxprobe ~]# vi/etc/profile.d/rh-mariadb101.sh
# Create new
#!/bin/bash
source/opt/rh/ Rh-mariadb101/enable
Export x_scls= ' SCL enable rh-mariadb101 ' echo $X _scls ' "

Enable MARIADB 10.1 and configure initial settings

Copy Code code as follows:
[Root@linuxprobe ~]# Mysql_secure_installation

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.