Centos8安装MariaDB10.5(采用国内镜像)

Centos8安装MariaDB10.5(采用国内镜像)
新建配置文件:MariaDB.repo

vim  /etc/yum.repos.d/MariaDB.repo

写入如下内容

# MariaDB 10.5 CentOS repository list - created 2020-10-23 01:54 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = https://mirrors.aliyun.com/mariadb/yum/10.5/centos8-amd64/
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

执行命令,开始安装

sudo dnf install MariaDB-server

开启服务

sudo systemctl start mariadb

开机启动

systemctl enable mariadb

初始化

mysql_secure_installation
Enter current password for root (enter for none):  //输入root(mysql)的密码。默认没有,直接回车 
Switch to unix_socket authentication [Y/n]   //是否切换到unix套接字身份验证[Y/n] n

Set root password? [Y/n]  –>是否设置root用户密码,输入y并回车或直接回车
New password:  –>设置root用户的密码
Re-enter new password:  –>再输入一次你设置的密码
Remove anonymous users? [Y/n]   –>是否删除匿名用户,回车
Disallow root login remotely? [Y/n]  –>是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n]   –>是否删除test数据库,回车
Reload privilege tables now? [Y/n]   –>是否重新加载权限表,回车

初始化MariaDB完成后,以mysql的root身份登录

mysql -uroot -p
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值