MariaDB数据库安装

MariaDB数据库安装

1、部署两台数据库服务器,一台yum部署(版本5.5),一台源码部署(5.7),并且执行mysql_secure_installation命令,进行安全设置,实现关闭远程登录,关闭匿名用户登录,并设置密码;

yum部署(版本5.5):

yum install -y mariadb mariadb-devel mariadb-server
安装完成后查询一下软件是否安装成功:
[root@localhost ~]# rpm -qa|grep mariadb
mariadb-5.5.65-1.el7.x86_64
mariadb-server-5.5.65-1.el7.x86_64
mariadb-devel-5.5.65-1.el7.x86_64
mariadb-libs-5.5.65-1.el7.x86_64
执行mysql_secure_installation:
[root@localhost ~]#mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, and you haven’t set the root password yet, the password will be blank,so you should just press enter here.
Enter current password for root (enter for none): #此处默认空密码敲回车键
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y #是否设置root密码,输入y(是)
New password: #输入新密码
Re-enter new password: #再次输入新密码
Password updated successfully!
Reloading privilege tables…
… Success!

By default, a MariaDB installation has an anonymous user, allowing
anyone to log into MariaDB without having to have a user account
creat

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值