#查看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. android studio差异化,productFlavors + buildTypes + signingConfigs 构建差异化 Android 应用
  2. java 线程 操作系统线程_线程基础:线程(1)——操作系统和线程原理
  3. mysql can_***MySQL错误:Can't connect to MySQL server (10060)
  4. boost::contract模块实现overload的测试程序
  5. Linux上传文件和下载文件命令行方式
  6. tp框架中引入php文件,Laravel框架及ThinkPHP框架超级简单的公共文件引入(保留变量)...
  7. Hadoop较全面的概述
  8. 程序设计工程师c语言,《C语言程序设计》自学百问.doc
  9. 95-240-065-源码-state-托管算子状态
  10. 波特率与频率的换算公式?_高中物理公式总结表
  11. cookie与token对比(转)
  12. 正则表达式与java String.split()
  13. iOS App之间的通信方式
  14. 《嵌入式 – GD32开发实战指南》第4章 GD32启动流程详解(Keil版)
  15. Linux系统变慢原因?
  16. 网上支付流程(大致)
  17. 计算机快捷键知识点,电脑常用快捷键复习知识点.pdf
  18. 医学影像组学人工智能应用培训班
  19. 章鱼网络 2022 虎年全回顾
  20. 临滴LKD2586编译缺少库

热门文章

  1. 【Java-网络编程】一对一聊天系统的实现
  2. yolov3的weights文件获取方法(yolov3-spp.weights等等)
  3. 在ie6下实现position-fixed的效果
  4. beyond compare软件安装与破解
  5. 优秀工程师应该具备哪些素质_作为现代工程师应具备的素养
  6. 2021年山东省职业院校技能大赛中职组“网络安全”赛项规程
  7. Win10如何把D盘空间分给C盘|Win10硬盘分成多个分区
  8. 通过piranha搭建lvs高可用集群
  9. 【附源码】计算机毕业设计java音乐鉴赏网站前端开发设计与实现
  10. 删除Linux Terminal中的历史记录