Linux安装高版本MariaDB

Linux安装高版本MariaDB


#停止服务
systemctl stop mariadb

#卸载
yum remove mariadb-server

#检查卸载残留
ps aux | grep mariadb
ps aux | grep mysql
find / -name mysql

上述查询存在目录就
rm -rf 上述存在的目录


#执行新的安装
cd  /etc/yum.repos.d/
vim MariaDB.repo
#录入以下内容
[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

#清除yum源缓存
yum clean all && yum makecache all

#开始安装
yum install MariaDB-server MariaDB-client


#启动并设置开机自启
systemctl start mariadb
systemctl enable mariadb

#设置初始化密码 输入如下命令一直Enter键即可
mysql_secure_installation

  

#find 查询文件并删除文件
find . -name ".DS_Store"
find . -name ".DS_Store"  | xargs rm -rf

注:find . .是当前文件

  

posted on 2023-09-04 09:44  loveking_阳  阅读(17)  评论(0编辑  收藏  举报

导航