#查看mariadb运行状态: systemctl status mariadb
#启动mariadb: systemctl start mariadb
#停止mariadb :systemctl stop mariadb
#重新启动 :systemctl restart mariadb
#开机启动: systemctl enable mariadb 1、查看sql版本:# mysql --version
mysql  Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.12、查看使用状态:# systemctl status mariadb3、查看自带安装信息:# rpm -qa | grep -i mariadb
mariadb-5.5.64-1.el7.x86_64
mariadb-server-5.5.64-1.el7.x86_64
mariadb-libs-5.5.64-1.el7.x86_64
4、查看自带安装信息:# yum list|grep mariadb
mariadb.x86_64                            1:5.5.64-1.el7               @os
mariadb-libs.x86_64                       1:5.5.64-1.el7               @os
mariadb-server.x86_64                     1:5.5.64-1.el7               @os
mariadb-bench.x86_64                      1:5.5.64-1.el7               os
mariadb-devel.i686                        1:5.5.64-1.el7               os
mariadb-devel.x86_64                      1:5.5.64-1.el7               os
mariadb-embedded.i686                     1:5.5.64-1.el7               os
mariadb-embedded.x86_64                   1:5.5.64-1.el7               os
mariadb-embedded-devel.i686               1:5.5.64-1.el7               os
mariadb-embedded-devel.x86_64             1:5.5.64-1.el7               os
mariadb-libs.i686                         1:5.5.64-1.el7               os
mariadb-test.x86_64                       1:5.5.64-1.el7               os5、停止服务运行并查看:# systemctl stop mariadb && systemctl status mariadb
6、开始卸载# yum remove -y mariadb && yum remove -y mariadb-*
7、#已搜不到安装信息
# yum list installed |grep mariadb
# rpm -qa|grep mariadb
# find / -name mysql
/var/lib/mysql
/usr/lib64/mysql
# rm -rf /var/lib/mysql/
# rm -rf /var/lib64/mysql/
# find / -name mariadb
/var/log/mariadb
# rm -rf /var/log/mariadb
8、配置yum源为国内地址:# vim /etc/yum.repos.d/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
9、清除yum源缓存数据,并生成新的yum源数据缓存
# yum clean all && yum makecache all
10、查看下载缓存信息
# ll /var/cache/yum/x86_64/7/mariadb
12、开始安装
# yum install MariaDB-server MariaDB-client -y
....
已安装:MariaDB-client.x86_64 0:10.2.31-1.el7.centos                                   MariaDB-server.x86_64 0:10.2.31-1.el7.centos作为依赖被安装:MariaDB-common.x86_64 0:10.2.31-1.el7.centos         MariaDB-compat.x86_64 0:10.2.31-1.el7.centos         boost-program-options.x86_64 0:1.53.0-27.el7galera.x86_64 0:25.3.28-1.rhel7.el7.centos完毕!
13、启动mariadb
# systemctl start mariadb.service
14、初始化配置信息(设置root密码)
# /usr/bin/mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS 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
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 created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] n... skipping.By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!
安装完成
15、创建初始化数据库(创建数据库如下图)
# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 20
Server version: 10.2.31-MariaDB MariaDB ServerCopyright (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)]> 
mysql> use mysql;
mysql> CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpi';   #用户名 密码
mysql> GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpi';
mysql> create database glpi;
mysql>grant select,insert,update,delete,create,drop on glpi.* to 'glpi'@'%';
mysql> quit

16、#重新启动 :systemctl restart mariadb
17、#开机启动: systemctl enable mariadb

												

CentOS7升级MariaDB 10.2版本详细步骤相关推荐

  1. centos7安装mysql5.7视频_Centos7安装MySQL5.7版本详细步骤

    Centos7安装MySQL5.7版本详细步骤 Centos7安装MySQL5.7版本详细步骤 目录 1.安装前准备: 2. 安装mysql 2.1 下载并安装mysql官方的yum源 2.2 安装m ...

  2. CentOS7安装MariaDB 10.4x

    CentOS7安装MariaDB 10.4x 1.下载安装包 2.按顺序安装依赖环境包 2.1 安装依赖环境包: yum install rsync nmap lsof perl-DBI nc 2.2 ...

  3. c++ https indy_在C++Builder中安装Indy 10.2.3详细步骤

    在C++Builder中安装Indy 10.2.3详细步骤 一直想自己制作一个通过SMTP协议发送邮件的小程序,打开BCB才知道BCB6中自带有NMSMTP和IdSMTP两种控件.NMSMTP只支持比 ...

  4. 适合centos7 64位虚拟机添加硬盘 详细 步骤

    文章目录 前言 步骤 1.虚拟机增加硬盘(重启后可见) 2.分区 3.格式化 4.挂载 5.设置永久挂载 总结 前言 Linux系统中,关于centos7安装新增硬盘的详细步骤如下,这里以添加sdb硬 ...

  5. centos7安装es mysql_Centos7 安装MySQL详细步骤

    Centos7 安装MySQL详细步骤 首先在虚拟机中安装一个Centos7(VM虚拟机安装Centos7) 1.1 MySQL安装 1.1.1 下载wget命令 yum -y install wge ...

  6. 从MongoDB2.4升级到3.0的详细步骤

    最近为了长远考虑想把项目MongoDB里存放的400多万数据迁移到云服务厂商提供的MongoDB服务上,省去自己去维护的时间,但是看了下云服务对MongoDB数据迁移上云的要求是自建MongoDB数据 ...

  7. win10家庭版升级到win10专业版或者其他版本详细步骤(快捷,秘钥升级)

    升级win10 网址 操作步骤 第一步 第二步 第三步 第四步 网址 打开后在下面选择你想升级 网址:http://www.xitongcheng.com/jiaocheng/xtazjc_artic ...

  8. Centos7升级到最新内核版本操作过程

    虽然有些人使用 Linux 来表示整个操作系统,但要注意的是,严格地来说,Linux 只是个内核.另一方面,发行版是一个完整功能的系统,它建立在内核之上,具有各种各样的应用程序工具和库. 在正常操作期 ...

  9. centos7+tomcat部署JavaWeb项目超详细步骤

    转自:https://www.cnblogs.com/xiaohu1218/p/7233162.html 我们平时访问的网站大多都是发布在云服务器上的,比如阿里云.腾讯云等.对于新手,尤其是没有接触过 ...

  10. centos7系统下安装JDK8的详细步骤

    一.前期准备 centos7虚拟机,xshell,,xftp,JDK8(linux版) 二.安装步骤 1. 启动centos7之后,通过  ifconfig 命令获取centos7的IP地址(注:以下 ...

最新文章

  1. esxi宿主机的本地存储-非活动
  2. 【树莓派】【转载】基于树莓派,制作家庭媒体中心+下载机
  3. 电子信息科学与技术计算机科学与技术会计学,我是本三学生 学的电子信息科学与技术专业 今年大三 从没接触过会计 想考注册会计师 可以么 ?...
  4. kotlin学习笔记——类、函数、接口
  5. Java入门算法(双指针篇)丨蓄力计划
  6. SpringAOP的CGLIB动态代理的底层原理实现
  7. 【转】.NET试题总结二
  8. 求奇数和的c语言程序,C语言程序求1—100之间的奇数和和偶数和
  9. MYSQL存储过程中事务和DECLARE EXIT/CONTINUE HANDLER的使用
  10. Rust : 泛型与trait限定
  11. UIView 不规则剪裁
  12. 03-JVM内存分配机制详解
  13. ios审核新坑解决,因为需要访问相机权限被拒绝We noticed that your app requests the user’s consent to access their camera
  14. JavaScript 教程「1」:与君初相识
  15. OC加强(三)之protocol(协议)/代理
  16. 日历提醒软件Export Calendars Pro for Mac
  17. 运动都需要什么装备?运动锻炼必备物品推荐
  18. stm32cubeide烧写程序_STM32 Cube IDE 下实现 IAP —— (1) 程序跳转
  19. java中更改jdk版本_win10更改jdk版本的方法是什么_win10系统如何更改jdk版本图文教程...
  20. 王刚日记:想赚钱,用户思维你有吗?

热门文章

  1. 计算机的了解以及组装
  2. Seo:入门须知(三)网页快照投诉
  3. matlab绘图边框美化
  4. RPC 开发系列一:RPC 基本介绍
  5. 学习+彭伟《揭秘深度强化学习》PDF+源代码+资料
  6. C++多线程-原子锁
  7. mapreduce流量统计与自定义分区算法:手机号码按归属地输出
  8. 请谈谈你对volatile的理解?--最近小李子与面试官的一场“硬核较量”
  9. 0LL或0x0UL是什么意思?
  10. VO快速搜索 宝马VO 宝马VO翻译 VO码查询工具