centos7.2使用yum安装MariaDB10.1
①添加MariaDB的yum源
1.创建MariaDB.repo
sudo vi /etc/yum.repos.d/Mariadb.repo
2.将以下文件中的字段添加到MariaDB.repo文件中
# MariaDB 10.1 CentOS repository list - created 2016-12-01 03:36 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
②yum安装MariaDB
sudo yum -y install MariaDB-server MariaDB-client
③启动MariaDB服务
systemctl start mysql.service
④配置MariaDB服务
使用mysql_secure_installation配置MariaDB服务
mysql_secure_installation
具体设置
#由于一开始安装MariaDB数据库后, root用户默认密码为空, 所以只需要按Enter键
Enter current password for root (enter for none):
#是否设置root用户的新密码
Set root password? [Y/n] y
#录入新密码
New password:
#确认新密码
Re-enter new password:
#是否删除匿名用户,生产环境建议删除
Remove anonymous users? [Y/n] y
#是否禁止root远程登录,根据自己的需求选择
Disallow root login remotely? [Y/n] n
#是否删除test数据库
Remove test database and access to it? [Y/n] y
#是否重新加载权限表
Reload privilege tables now? [Y/n] y
⑤开启远程访问
1.防火墙添加3306端口
查看firewall状态
firewall-cmd --state
状态是not running,启动firewall
systemctl start firewalld
状态是running
开放3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent
重新载入
firewall-cmd --reload
2.明明之前有设置root开启远程的,但是我这里访问不了,所以重新去MariaDB赋权限
#进入Mariadb
mysql -uroot -p
#选择数据库
use mysql;
#添加权限
Grant all on *.* to 'root'@'%' identified by 'root用户的密码' with grant option;
#重新载入
flush privileges;
centos7.2使用yum安装MariaDB10.1的更多相关文章
- CentOS7下使用YUM安装mariadb10
1:由于centos7 默认使用yum安装MySQL的话就会安装mariadb,只是安装的版本停留在mariadb5.x,版本比较低.如果我们需要安装mariadb10这里就需要删除mariadb-l ...
- CentOS7.3下yum安装MariaDB10.3.12并指定utf8字符集
添加MariaDB的yum源,指定安装的版本,然后使用 yum 工具进行安装 参考MariaDB官方网站对应安装方法和步骤 https://downloads.mariadb.org/mariadb/ ...
- centos7下使用yum安装mysql
CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 wget http://repo.mysql.com/m ...
- centos7下使用yum安装pip
centos7下使用yum安装pip 首先安装epel扩展源: yum -y install epel-release 更新完成之后,就可安装pip: yum -y install python-pi ...
- <亲测>CentOS7中使用yum安装Nginx的方法
CentOS7中使用yum安装Nginx的方法 最近无意间发现Nginx官方提供了Yum源.因此写个文章记录下. 1.添加源 默认情况Centos7中无Nginx的源,最近发现Nginx官网提供了 ...
- centos7中使用yum安装tomcat以及它的启动、停止、重启
centos7中使用yum安装tomcat 介绍 Apache Tomcat是用于提供Java应用程序的Web服务器和servlet容器. Tomcat是Apache Software Foundat ...
- centos7下使用yum安装redis
centos7下使用yum安装Redis 第一步:安装 yum –y install redis 第二步:启动 systemctl start redis.service 第三步:设置开机启动 sys ...
- Centos7.6使用yum安装PHP7.2
Centos7.6使用yum安装PHP7.2 1.安装源 安装php72w,是需要配置额外的yum源地址的,否则会报错不能找到相关软件包. php高版本的yum源地址,有两部分,其中一部分是epel- ...
- CentOS8 yum安装Mariadb10.4
CentOS8 yum安装Mariadb10.4 https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distr ...
随机推荐
- XJOI NOIP模拟题2
第一题 组合计数 分析: 从前往后一位一位的计算 先算第一位比t小的数目,再算第一位与t[1]相同,第2位比t小的个数以此类推 先预处理一个数组h,h[i]表示从1~it串与s串不同的位数 对于第i位 ...
- hdu 2527 Safe Or Unsafe (哈夫曼树)
Safe Or Unsafe Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
- poj 2155 Matrix (树状数组)
Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 16797 Accepted: 6312 Descripti ...
- Visio中ShapeAdded和SelectionAdded
SelectionAdded 和 ShapeAdded 事件的相似之处在于它们都在创建形状之后触发.它们的区别在于,当单个操作添加多个形状时它们的行为方式不同.假定一个 Paste 操作创建三个新建形 ...
- CodeForces743E. Vladik and cards 二分+状压dp
这个题我们可以想象成_---___-----__的一个水柱它具有一遍优一遍行的性质因此可以用来二分最小值len,而每次二分后我们都要验根,we可以把这个水柱想成我们在每个数段里取前一段的那个数后一段有 ...
- CentOs7 minimal安装后没有ifconfig命令解决方法
没有ifconfig命令目前我了解两个原因: 1./sbin/ifconfig 可以执行,但是ifconfig无法执行.这个解决的时候只需要将/sbin 添加到PATH下就可以了. 2.系统未安装if ...
- Ubuntu下安装LNMP之Mysql的安装及卸载
Mysql的安装过程也可参考:http://blog.csdn.net/qq_20565303/article/details/69813868 Mysql安装包下载地址:https://dev.my ...
- Educational Codeforces Round 55:B. Vova and Trophies
B. Vova and Trophies 题目链接:https://codeforc.es/contest/1082/problem/B 题意: 给出一个“GS”串,有一次交换两个字母的机会,问最大的 ...
- Oulipo HDU - 1686
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e ...
- eclipse 主题文件配置
eclipse市场搜索 Eclipse Color Theme ----用于控制文本域主题 Eclipse 4 Chrome Theme chrome风格的主题 最新的:Jeeeyul's Them ...