新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
CentOS安裝MariaDB數(shù)據(jù)庫(MySQL的分支)
由于mysql已經(jīng)有閉源的趨勢(shì),所以大部分系統(tǒng)已經(jīng)不建議使用MySQL,Mariadb是MySQL之父創(chuàng)建的一個(gè)MySQL分支項(xiàng)目,使用起來幾乎一模一樣。

1.centos安裝MariaDB
# yum install mariadb-server mariadb-client
2.運(yùn)行數(shù)據(jù)庫
# systemctl start mariadb
3.進(jìn)入數(shù)據(jù)庫并創(chuàng)建一個(gè)production數(shù)據(jù)庫
# mysql
# MariaDB [(none)]> create database production;
# MariaDB [(none)]> use production;
# MariaDB [(none)]> flush privileges;
4.為production數(shù)據(jù)庫創(chuàng)建一個(gè)遠(yuǎn)程登陸的用戶
# MariaDB [(none)]> create user 'test1'@'%' identified by 'test1';
# MariaDB [(none)]> grant all privileges on production.* to test1 identified by 'test1';
# MariaDB [(none)]> flush privileges;
5.使用test1用戶連接數(shù)據(jù)庫
# mysql -u test1 -p
Enter password: test1
6.登陸成功!
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 214
Server version: 5.5.52-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)]> 當(dāng)前標(biāo)題:CentOS安裝MariaDB數(shù)據(jù)庫(MySQL的分支)
分享網(wǎng)址:http://m.fisionsoft.com.cn/article/coocojo.html


咨詢
建站咨詢
