linux卸载mariadb数据库,CentOS yum 安装、卸载MariaDB数据库
CentOS版本:CentOS-7-x86_64-Minimal-1511
1、安裝Mariadb
[root@localhost~]# yum -y install mariadb-server
2、啟動(dòng)服務(wù)并設(shè)置開(kāi)機(jī)啟動(dòng)
[root@localhost~]# systemctl start mariadb
[root@localhost~]# systemctl enable mariadb
3、配置MariaDB
[root@localhost~]# MysqL_secure_installation
#輸入當(dāng)前root密碼
Entercurrent password for root (enter for none):
#設(shè)置root密碼?
Changethe root password?[Y/n]
#
Removeanonymous users?[Y/n]
#root
Disallowroot login remotely?[Y/n]
#test
Removetest database and access to it? [Y/n]
#重新加載權(quán)限表?
Reloadprivilege tables now? [Y/n]
4、配置MariaDB字符編碼(以u(píng)tf8mb4為例)
[root@localhost~]# vi /etc/my.cnf
#在[MysqLd]標(biāo)簽下添加
character-set-server=utf8mb4
[root@localhost~]# vi /etc/my.cnf.d/client.cnf
#在[client]標(biāo)簽下添加
default-character-set=utf8mb4
5、重啟啟動(dòng)MariaDB服務(wù)
[root@localhost~]# systemctl restart mariadb
6、查看MariaDB字符編碼
MariaDB[(none)]show variables like ‘%character%’;
7、卸載MariaDB
[root@localhost~]# rpm -aq|grep mariadb
mariadb-libs-5.5.50-1.e17_2.x86_64
mariadb-5.5.50-1.e17_2.x86_64
mariadb-server-5.5.50-1.e17_2.x86_64
[root@localhost~]# yum -y remove mariadb*
總結(jié)
如果覺(jué)得編程之家網(wǎng)站內(nèi)容還不錯(cuò),歡迎將編程之家網(wǎng)站推薦給程序員好友。
本圖文內(nèi)容來(lái)源于網(wǎng)友網(wǎng)絡(luò)收集整理提供,作為學(xué)習(xí)參考使用,版權(quán)屬于原作者。
小編個(gè)人微信號(hào) jb51ccc
喜歡與人分享編程技術(shù)與工作經(jīng)驗(yàn),歡迎加入編程之家官方交流群!
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的linux卸载mariadb数据库,CentOS yum 安装、卸载MariaDB数据库的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: linux web文件夹权限设置,WEB
- 下一篇: linux界面版admin,linux下