激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

Linux|Centos|Ubuntu|系統(tǒng)進(jìn)程|Fedora|注冊(cè)表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務(wù)器之家 - 服務(wù)器系統(tǒng) - Centos - CentOS 7.2 安裝MariaDB詳細(xì)過程

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

2021-11-26 16:42shaonbean Centos

這篇文章主要為大家介紹了CentOS 7.2 安裝MariaDBMariaDB數(shù)據(jù)庫(kù)管理系統(tǒng)詳細(xì)過程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

mariadb簡(jiǎn)介

mariadb數(shù)據(jù)庫(kù)管理系統(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被甲骨文收購(gòu),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

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

安裝mariadb 5.5

安裝mariadb 5.5是centos 7的默認(rèn)版本,配置數(shù)據(jù)庫(kù)服務(wù)器

?
1
2
3
4
5
6
7
8
[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

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[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端口

?
1
2
3
4
5
# 客戶端設(shè)置
[root@vdevops ~]# firewall-cmd --add-service=mysql --permanent
success
[root@vdevops ~]# firewall-cmd --reload
success

安裝phpmyadmin

前提安裝web服務(wù)器和php,參考下面:

http://www.zmynmublwnt.cn/article/207898.html

http://www.zmynmublwnt.cn/article/207912.html

安裝phpmyadmin

?
1
2
3
4
5
6
7
8
# 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ù)。

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

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

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

mariadb 主從復(fù)制

mariadb 主從復(fù)制和mysql主從復(fù)制相同,請(qǐng)移步到:http://www.zmynmublwnt.cn/article/80637.html

安裝 mariadb 10.1

配置 centos sclo源倉(cāng)庫(kù)

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

 

來自centos-sclo-rh的軟件包安裝在/ opt目錄下。 要使用它,加載環(huán)境變量如下。

?
1
2
3
4
5
[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)如下配置

?
1
2
3
4
5
[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

 

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持服務(wù)器之家。

原文鏈接:http://blog.csdn.net/wh211212/article/details/53129488

延伸 · 閱讀

精彩推薦
  • CentosCentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法

    CentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法,涉及針對(duì)CentOS配置文件的相關(guān)設(shè)置技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下 ...

    Linux社區(qū)4472020-08-21
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權(quán)限。uptime命令在系統(tǒng)中已經(jīng)默認(rèn)安裝了。今天小編為大家?guī)淼氖荂entOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • CentosCentos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法

    Centos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法

    本篇文章主要介紹了Centos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹

    CentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設(shè)置日期時(shí)間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
  • CentosCentOS6.5下Redis安裝與配置詳細(xì)步驟

    CentOS6.5下Redis安裝與配置詳細(xì)步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細(xì)步驟,詳細(xì)介紹redis單機(jī)單實(shí)例安裝與配置,服務(wù)及開機(jī)自啟動(dòng)。有興趣的可以了解一下。...

    飛流11452021-12-24
  • CentosCentos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化

    Centos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化

    這篇文章主要介紹了LINUX中Centos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化相關(guān)知識(shí)點(diǎn),對(duì)此有興趣的朋友參考學(xué)習(xí)下。...

    彬菌9912022-03-02
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對(duì)大家會(huì)有幫助,有需要的朋友...

    腳本之家8022019-05-29
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
主站蜘蛛池模板: 国产精品高潮99久久久久久久 | 精品一区二区三区网站 | 欧美 国产 综合 | 成人爽a毛片免费啪啪红桃视频 | 中文字幕在线观看国产 | 一级全毛片 | 1级片在线观看 | 欧美成人午夜精品久久久 | 欧美毛片免费观看 | 日韩视频区 | 91成人在线免费视频 | 成人免费电影在线观看 | 看毛片的网址 | 最近高清无吗免费看 | 欧美一级毛片美99毛片 | 91精品国产91久久久久久不卞 | 久欧美| 一本一道久久久a久久久精品91 | 久久久久久三区 | 国产无遮挡一区二区三区毛片日本 | 黄色毛片视频在线观看 | 偷偷操偷偷操 | 噜噜噜躁狠狠躁狠狠精品视频 | 国内精品国产三级国产a久久 | 97久色| 日韩中文字幕一区二区三区 | 永久免费av片在线观看全网站 | 麻豆视频网| 日韩av电影免费看 | 777午夜精品视频在线播放 | 伊人亚洲精品 | 康妮卡特欧美精品一区 | 精品国产一区二区三区久久久蜜月 | 国产免费人做人爱午夜视频 | 毛片免费观看视频 | 日韩欧美综合在线 | 午夜精品区 | 视频www | 久久人人人 | 97人操| 日本xxxx色视频在线观看免费, |