1. 程式人生 > >CentOS 7系統安裝 MariaDB

CentOS 7系統安裝 MariaDB

MariaDB資料庫管理系統是MySQL的一個分支,主要由開源社群在維護。MariaDB完全相容MySQL,包括API和命令列。本文以滴滴雲為例,介紹在CentOS 7系統安裝MariaDB。

切換成為root

[[email protected] ~]$ sudo su
[[email protected] dc2-user]#

安裝Mariadb

[[email protected] dc2-user]# yum install mariadb-server mariadb

啟動Mariadb

[[email protected]

dc2-user]# systemctl start mariadb

驗證是否啟動

[[email protected] dc2-user]# systemctl status mariadb
在這裡插入圖片描述

進入資料庫,首次進入無密碼

[[email protected] dc2-user]# mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>

關於密碼和遠端訪問設定,請參看上一篇「CentOS 7 系統安裝與遠端連線 MySQL 5.7」