CentOS 7.2 安裝MariaDB詳細過程
MariaDB簡介
MariaDB數(shù)據(jù)庫管理系統(tǒng)是MySQL的一個分支,主要由開源社區(qū)在維護,采用GPL授權(quán)許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。在存儲引擎方面,使用XtraDB(英語:XtraDB)來代替MySQL的InnoDB。 MariaDB由MySQL的創(chuàng)始人Michael Widenius(英語:Michael Widenius)主導開發(fā),他早前曾以10億美元的價格,將自己創(chuàng)建的公司MySQL AB賣給了SUN,此后,隨著SUN被甲骨文收購,MySQL的所有權(quán)也落入Oracle的手中。MariaDB名稱來自Michael Widenius的女兒Maria的名字。
MariaDB 官網(wǎng):https://mariadb.org/
MariaDB 下載:https://downloads.mariadb.org/
MariaDB Github地址:https://github.com/MariaDB/server

安裝MariaDB 5.5
安裝MariaDB 5.5是CentOS 7的默認版本,配置數(shù)據(jù)庫服務(wù)器
[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'
初始化MariaDB
連接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) 2000, 2016, Oracle, MariaDB 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
防火墻開啟3306端口
# 客戶端設(shè)置 [root@vdevops ~]# firewall-cmd --add-service=mysql --permanent success [root@vdevops ~]# firewall-cmd --reload success
安裝phpMyAdmin
前提安裝web服務(wù)器和php,參考下面:
http://m.fzitv.net/article/97434.htm
http://m.fzitv.net/article/97587.htm
安裝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 you permit to access Require ip 127.0.0.1 10.1.1.0/24 # line 34: IP address you permit to access Require ip 127.0.0.1 10.1.1.o/24 [root@linuxprobe ~]# systemctl restart httpd
使用Web瀏覽器從客戶端訪問“http://(您的主機名或IP地址)/ phpmyadmin /',然后在MariaDB的用戶在以下屏幕上登錄。此示例使用root用戶繼續(xù)。

登錄之后,您可以在這里操作MariaDB

MariaDB 主從復制
MariaDB 主從復制和MySQL主從復制相同,請移步到:http://m.fzitv.net/article/97412.htm
安裝 MariaDB 10.1
配置 CentOS SCLo源倉庫
來自centos-sclo-rh的軟件包安裝在/ opt目錄下。 要使用它,加載環(huán)境變量如下。
[root@linuxprobe ~]# scl enable rh-mariadb101 bash [root@linuxprobe ~]# mysql -V mysql Ver 15.1 Distrib 10.1.14-MariaDB, for Linux (x86_64) using EditLine wrapper [root@linuxprobe ~]# which mysql /opt/rh/rh-mariadb101/root/usr/bin/mysql
如果您希望在登錄時自動啟用MariaDB 10.1,請如下配置
[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'`"
啟用MariaDB 10.1并配置初始設(shè)置
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
- CentOS 7中成功安裝MariaDB的方法教程
- 詳解如何在 CentOS 7 上安裝和安全配置 MariaDB 10
- CentOS 7 x64下Apache+MySQL(Mariadb)+PHP56的安裝教程詳解
- CentOS6.7系統(tǒng)中編譯安裝MariaDB數(shù)據(jù)庫
- CentOS 7.0服務(wù)器安裝配置LAMP服務(wù)器(Apache+PHP+MariaDB)
- CentOS安裝和設(shè)置MariaDB的教程
- 詳解Centos 使用YUM安裝MariaDB
- centos 7安裝mysql5.5和安裝 mariadb使用的命令
- centos 7下安裝mysql(MariaDB)的教程
相關(guān)文章
Linux 命令查詢小程序中的 WePY 云開發(fā)實踐
這篇文章主要介紹了云開發(fā)與 WePY,快速實現(xiàn) Linux 命令查詢小程序,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2019-04-04
基于python的Linux系統(tǒng)指定進程性能監(jiān)控思路詳解
這篇文章主要介紹了基于python的Linux系統(tǒng)指定進程性能監(jiān)控的思路詳解,本文給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-09-09
apache 開啟重定向 rewrite的實現(xiàn)方法
這篇文章主要介紹了apache 開啟重定向 rewrite的實現(xiàn)方法的相關(guān)資料,希望通過本文能幫助到大家,讓大家實現(xiàn)這樣的功能,需要的朋友可以參考下2017-10-10
電腦意外關(guān)機后VMware中l(wèi)inux不能聯(lián)網(wǎng)問題的解決方法
這篇文章主要為大家解決電腦意外關(guān)機后,再次開機啟動VMware時發(fā)現(xiàn)linux不能聯(lián)網(wǎng)的問題,具有一定的參考價值,感興趣的小伙伴們可以參考一下2019-03-03
一分鐘掌握linux系統(tǒng)目錄結(jié)構(gòu)
這篇文章主要介紹了linux系統(tǒng)目錄結(jié)構(gòu),通過結(jié)構(gòu)圖和多張表格了解linux系統(tǒng)目錄結(jié)構(gòu),感興趣的小伙伴們可以參考一下2016-05-05
linux Centos7斷網(wǎng)下安裝應(yīng)用程序詳解
在本篇文章里小編給大家整理的是關(guān)于linux最新版本Centos7,斷網(wǎng)情況下安裝應(yīng)用程序相關(guān)步驟,需要的朋友們可以學習下。2019-08-08
騰訊云ubuntu服務(wù)器tomcat訪問慢的原因分析及解決方法
在騰訊云上配了個一元的學生云,開始一切正常,直到配置tomcat開始出現(xiàn)各種莫名其妙的問題。最終找到問題的原因。下面小編通過本教程給大家介紹下騰訊云ubuntu服務(wù)器tomcat訪問慢的原因分析及解決方法,一起看看吧2016-10-10

