欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

CentOS 7.2 安裝MariaDB詳細(xì)過程

 更新時(shí)間:2016年11月17日 16:31:22   作者:shaonbean  
這篇文章主要為大家介紹了CentOS 7.2 安裝MariaDBMariaDB數(shù)據(jù)庫管理系統(tǒng)詳細(xì)過程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

MariaDB簡介

MariaDB數(shù)據(jù)庫管理系統(tǒng)是MySQL的一個(gè)分支,主要由開源社區(qū)在維護(hù),采用GPL授權(quán)許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。在存儲(chǔ)引擎方面,使用XtraDB(英語:XtraDB)來代替MySQL的InnoDB。 MariaDB由MySQL的創(chuàng)始人Michael Widenius(英語:Michael Widenius)主導(dǎo)開發(fā),他早前曾以10億美元的價(jià)格,將自己創(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的默認(rèn)版本,配置數(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

復(fù)制代碼 代碼如下:
[root@linuxprobe~]# mysql_secure_installation   #和MySQL一樣,一路y

連接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://www.dbjr.com.cn/article/97434.htm

http://www.dbjr.com.cn/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://(您的主機(jī)名或IP地址)/ phpmyadmin /',然后在MariaDB的用戶在以下屏幕上登錄。此示例使用root用戶繼續(xù)。

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

MariaDB 主從復(fù)制

MariaDB 主從復(fù)制和MySQL主從復(fù)制相同,請(qǐng)移步到:http://www.dbjr.com.cn/article/97412.htm

安裝 MariaDB 10.1

配置 CentOS SCLo源倉庫

復(fù)制代碼 代碼如下:
[root@linuxprobe ~]# yum --enablerepo=centos-sclo-rh -y install rh-mariadb101-mariadb-server

來自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

如果您希望在登錄時(shí)自動(dòng)啟用MariaDB 10.1,請(qǐng)如下配置

[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è)置

復(fù)制代碼 代碼如下:
[root@linuxprobe ~]# mysql_secure_installation

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • linux線程間的同步與互斥知識(shí)點(diǎn)總結(jié)

    linux線程間的同步與互斥知識(shí)點(diǎn)總結(jié)

    在本篇文章里小編給大家整理的是關(guān)于linux線程間的同步與互斥的相關(guān)知識(shí)點(diǎn),有興趣的朋友們學(xué)習(xí)下。
    2019-11-11
  • 判斷Unix系統(tǒng)及庫文件是32位還是64位的詳解

    判斷Unix系統(tǒng)及庫文件是32位還是64位的詳解

    這篇文章主要介紹了判斷Unix系統(tǒng)及庫文件是32位還是64位的的相關(guān)資料,這里整理下查看系統(tǒng)位數(shù)的命令,需要的朋友可以參考下
    2016-11-11
  • linux tar壓縮排除某個(gè)文件夾的方法

    linux tar壓縮排除某個(gè)文件夾的方法

    下面小編就為大家?guī)硪黄猯inux tar壓縮排除某個(gè)文件夾的方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2016-12-12
  • Linux下配置jdk環(huán)境的方法

    Linux下配置jdk環(huán)境的方法

    這篇文章主要介紹了Linux下配置jdk環(huán)境的方法,非常不錯(cuò),具有一定的參考借鑒價(jià)值 ,需要的朋友可以參考下
    2019-05-05
  • linux無損擴(kuò)容的方法

    linux無損擴(kuò)容的方法

    這篇文章主要介紹了linux無損擴(kuò)容的方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2018-12-12
  • linux下mysql數(shù)據(jù)庫的操作的方法

    linux下mysql數(shù)據(jù)庫的操作的方法

    下面小編就為大家?guī)硪黄猯inux下mysql數(shù)據(jù)庫的操作的方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-01-01
  • linux: centos設(shè)置ip以及連接外網(wǎng)的方法

    linux: centos設(shè)置ip以及連接外網(wǎng)的方法

    本篇文章主要介紹了linux: centos設(shè)置ip以及連接外網(wǎng)的方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-02-02
  • Linux的wget命令詳解

    Linux的wget命令詳解

    這篇文章主要為大家詳細(xì)介紹了Linux的wget命令,教大家如何使用wget,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • Linux使用Sudo委派權(quán)限

    Linux使用Sudo委派權(quán)限

    今天小編就為大家分享一篇關(guān)于Linux使用Sudo委派權(quán)限的文章,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧
    2018-10-10
  • linux系統(tǒng)下用戶管理相關(guān)介紹

    linux系統(tǒng)下用戶管理相關(guān)介紹

    大家好,本篇文章主要講的是linux系統(tǒng)下用戶管理相關(guān)介紹,感興趣的同學(xué)趕快來看一看吧,對(duì)你有幫助的話記得收藏一下哦,方便下次瀏覽
    2021-12-12

最新評(píng)論