linux卸载mariadb数据库,CentOS yum 安装、卸载MariaDB数据库
CentOS版本:CentOS-7-x86_64-Minimal-1511
1、安裝Mariadb
[root@localhost~]# yum -y install mariadb-server
2、啟動服務并設置開機啟動
[root@localhost~]# systemctl start mariadb
[root@localhost~]# systemctl enable mariadb
3、配置MariaDB
[root@localhost~]# MysqL_secure_installation
#輸入當前root密碼
Entercurrent password for root (enter for none):
#設置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]
#重新加載權限表?
Reloadprivilege tables now? [Y/n]
4、配置MariaDB字符編碼(以utf8mb4為例)
[root@localhost~]# vi /etc/my.cnf
#在[MysqLd]標簽下添加
character-set-server=utf8mb4
[root@localhost~]# vi /etc/my.cnf.d/client.cnf
#在[client]標簽下添加
default-character-set=utf8mb4
5、重啟啟動MariaDB服務
[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*
總結
如果覺得編程之家網站內容還不錯,歡迎將編程之家網站推薦給程序員好友。
本圖文內容來源于網友網絡收集整理提供,作為學習參考使用,版權屬于原作者。
小編個人微信號 jb51ccc
喜歡與人分享編程技術與工作經驗,歡迎加入編程之家官方交流群!
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的linux卸载mariadb数据库,CentOS yum 安装、卸载MariaDB数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux web文件夹权限设置,WEB
- 下一篇: linux界面版admin,linux下