首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CentOS7系统YUM安装MariaDB10.3

CentOS7系统YUM安装MariaDB10.3

作者头像
Zach
发布2018-07-04 16:35:02
9630
发布2018-07-04 16:35:02
举报
文章被收录于专栏:日暮星辰日暮星辰

1.增加MariaDB的repo源:

# MariaDB 10.3 CentOS repository list - created 2018-05-26 07:55 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.3/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1

1234567

# MariaDB 10.3 CentOS repository list - created 2018-05-26 07:55 UTC  # http://downloads.mariadb.org/mariadb/repositories/  [mariadb]  name = MariaDB  baseurl = http://yum.mariadb.org/10.3/centos7-amd64  gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB  gpgcheck=1

2.清除Yum缓存,重建缓存

yum clean all yum makecache

12

yum clean all yum makecache

3.查询MariaDB源中的软件包

yum list --disablerepo=\* --enablerepo=mariadb

1

yum list --disablerepo=\* --enablerepo=mariadb

其中test为测试工具,backup为备份工具

4.安装安装MariaDB数据库

yum install MariaDB-client MariaDB-server MariaDB-devel -y

1

yum install MariaDB-client MariaDB-server MariaDB-devel -y

5.启动数据库及设置MariaDB开机自启

systemctl start mariadb systemctl enable mariadb

12

systemctl start mariadb  systemctl enable mariadb

6.初始化数据库,并删除测试数据库及更改权限和设置密码

mysql_secure_installation

1

mysql_secure_installation

第一步为输入密码,首次安装未设定默认为空,直接Enter

Change the root password? [Y/n] 该项为询问是否设置新密码。建议设置新密码。其他项目按照默认Y即可。

7.测试进入MariaDB

mysql -uroot -p -A Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2894 Server version: 10.3.7-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>

1234567891011

mysql -uroot -p -A  Enter password: Welcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 2894Server version: 10.3.7-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-06-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 MariaDB
腾讯云数据库 MariaDB(TencentDB for MariaDB) 让您轻松在云端部署、使用 MariaDB 数据库。MariaDB 是在 MySQL 版权被 Oracle 收购后,由 MySQL 创始人 Monty 创立,其版权授予了“MariaDB基金会(非营利性组织)”以保证 MariaDB 永远开源,良好的开源策略,是企业级应用的最优选择,主流开源社区系统/软件的数据库系统,均已默认配置 MariaDB。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档