CentOS系統(tǒng)中如何安裝和使用MariaDB數(shù)據(jù)庫(kù)?

1、查詢(xún)MariaDB包

創(chuàng)新互聯(lián)建站服務(wù)項(xiàng)目包括金鄉(xiāng)網(wǎng)站建設(shè)、金鄉(xiāng)網(wǎng)站制作、金鄉(xiāng)網(wǎng)頁(yè)制作以及金鄉(xiāng)網(wǎng)絡(luò)營(yíng)銷(xiāo)策劃等。多年來(lái),我們專(zhuān)注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,金鄉(xiāng)網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶(hù)以成都為中心已經(jīng)輻射到金鄉(xiāng)省份的部分城市,未來(lái)相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶(hù)的支持與信任!

[root@test ~]# yum list all | grep mariadb

2、安裝mariaDB

[root@test ~]# yum -y install mariadb-server

3、配置mariaDB

[root@test ~]# systemctl start mariadb         #啟動(dòng)MariaDB
[root@test ~]# systemctl enable mariadb        #設(shè)置MariaDB為開(kāi)機(jī)自啟動(dòng)
[root@test ~]# netstat -ntlp              #查看3306端口是否成功啟動(dòng)
[root@test ~]# MySQL_secure_installation        #首次安裝需要進(jìn)行數(shù)據(jù)庫(kù)的配置

Enter current password for root (enter for none):  # 輸入數(shù)據(jù)庫(kù)超級(jí)管理員root的密碼(注意不是系統(tǒng)root的密碼),第一次進(jìn)入還沒(méi)有設(shè)置密碼則直接回車(chē)
Set root password? [Y/n]  # 設(shè)置密碼,y
New password:  # 新密碼
Re-enter new password:  # 再次輸入密碼
Remove anonymous users? [Y/n]  # 移除匿名用戶(hù), y
Disallow root login remotely? [Y/n]  # 拒絕root遠(yuǎn)程登錄,y
Remove test database and access to it? [Y/n]  # 刪除test數(shù)據(jù)庫(kù),y:刪除。n:不刪除,數(shù)據(jù)庫(kù)中會(huì)有一個(gè)test數(shù)據(jù)庫(kù),一般不需要
Reload privilege tables now? [Y/n]  # 重新加載權(quán)限表,y?;蛘咧貑⒎?wù)也許

4、登錄測(cè)試mariaDB

[root@test ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 5.5.60-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]>quit

網(wǎng)站名稱(chēng):CentOS系統(tǒng)中如何安裝和使用MariaDB數(shù)據(jù)庫(kù)?
網(wǎng)頁(yè)鏈接:http://www.muchs.cn/article38/jiojpp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司、搜索引擎優(yōu)化企業(yè)建站、手機(jī)網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)