当前位置: 首页 > news >正文

MySQL 5.7.20在RedHat 7.2上通过RPM包安装

一、安装环境

1、操作系统版本:Red Hat Enterprise Linux Server release 7.2 (Maipo)

2、Mysql版本:mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar


二、安装说明

1、官网上关于mysql 5.7的各个rpm包的说明如下:

image.png

2、官网上关于mysql5.7用rpm包安装的各个路径说明如下:

02.png

3、官网上关于标准安装需要安装哪些rpm包的说明如下:

image.png

4、官网上关于安装后初始化的说明:使用rpm包安装后会在第一次启动服务时自动完成初始化,无需再手动执行初始化操作

image.png

image.png

三、安装过程

1、解压mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar

image.png

2、卸载掉系统中的mariadb-libs

image.png

3、按照下图顺序依次安装各个rpm包,各个rpm包之间有依赖关系,最后安装mysql-community-server-5.7.20-1.el7.x86_64.rpm时报缺少相关依赖包,使用yum装上,再安装就没问题了

image.png

image.pngimage.png

image.png

4、查看mysql的相关目录,是空的

image.png

5、安装完后mysql服务已经enable,但是没有启动,启动它

image.png6、启动mysql服务后,日志如下:其中记录了随机生成的初始root密码“A temporary password is generated for root@localhost: urq2&OKwZd,t”

2018-04-18T10:31:46.894089Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-04-18T10:31:50.089964Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-04-18T10:31:50.319434Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-04-18T10:31:50.380647Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: b44683a6-42f3-11e8-8b54-000c29ffe62f.
2018-04-18T10:31:50.382406Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-04-18T10:31:50.383390Z 1 [Note] A temporary password is generated for root@localhost: urq2&OKwZd,t
2018-04-18T10:31:54.678495Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-04-18T10:31:54.679697Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.20) starting as process 2954 ...
2018-04-18T10:31:54.685450Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-04-18T10:31:54.685476Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-04-18T10:31:54.685479Z 0 [Note] InnoDB: Uses event mutexes
2018-04-18T10:31:54.685481Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-04-18T10:31:54.685483Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-04-18T10:31:54.685486Z 0 [Note] InnoDB: Using Linux native AIO
2018-04-18T10:31:54.685708Z 0 [Note] InnoDB: Number of pools: 1
2018-04-18T10:31:54.685812Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-04-18T10:31:54.739376Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-04-18T10:31:54.753795Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-04-18T10:31:54.758522Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-04-18T10:31:54.772576Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-04-18T10:31:54.793537Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-04-18T10:31:54.793646Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-04-18T10:31:54.952587Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-04-18T10:31:54.955544Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-04-18T10:31:54.955610Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-04-18T10:31:54.957052Z 0 [Note] InnoDB: Waiting for purge to start
2018-04-18T10:31:55.007837Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 2565523
2018-04-18T10:31:55.009136Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-04-18T10:31:55.018932Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-04-18T10:31:55.027051Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180418 18:31:55
2018-04-18T10:31:55.036775Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2018-04-18T10:31:55.037779Z 0 [Warning] CA certificate ca.pem is self signed.
2018-04-18T10:31:55.092734Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-04-18T10:31:55.092981Z 0 [Note] IPv6 is available.
2018-04-18T10:31:55.093007Z 0 [Note]   - '::' resolves to '::';
2018-04-18T10:31:55.093031Z 0 [Note] Server socket created on IP: '::'.
2018-04-18T10:31:55.107483Z 0 [Note] Event Scheduler: Loaded 0 events
2018-04-18T10:31:55.108147Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.20'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
2018-04-18T10:31:55.108170Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
2018-04-18T10:31:55.108186Z 0 [Note] Beginning of list of non-natively partitioned tables
2018-04-18T10:31:55.124516Z 0 [Note] End of list of non-natively partitioned tables

7、此时再查看mysql的目录,相关文件已经自动生成

image.png

8、使用日志中记录的初始密码登录,并修改root密码

image.png

9、使用新密码成功登录,安装完毕

image.png

本文出自江健龙的技术博客,如有转载请注明出处 http://blog.51cto.com/jiangjianlong/2105112

相关文章:

  • 面试题3:数组中重复的数字,不能修改原数组
  • 蓝牙 bluez 的编程 C C++
  • Golang自定义包总结
  • Js基础——数据类型之Null和Undefined
  • 如何调用带返回值类型的函数
  • 通过pfSense阻止对某个网站的访问
  • scala基础语法(二)
  • python subprocess
  • linux笔记4.0
  • Oracle毙掉JavaOne
  • node入门
  • HTML5+CSS3+jQuery Mobile轻松构造APP与移动网站 (陈婉凌) 中文pdf扫描版
  • 拓展jquery js动态添加html代码 初始化数据
  • 几种编码格式
  • “Head First 设计模式“ :适配器模式
  • ES6指北【2】—— 箭头函数
  • 【EOS】Cleos基础
  • CSS盒模型深入
  • es6要点
  • Java 9 被无情抛弃,Java 8 直接升级到 Java 10!!
  • javascript面向对象之创建对象
  • Java多线程(4):使用线程池执行定时任务
  • JS进阶 - JS 、JS-Web-API与DOM、BOM
  • js作用域和this的理解
  • UMLCHINA 首席专家潘加宇鼎力推荐
  • vue从创建到完整的饿了么(18)购物车详细信息的展示与删除
  • 干货 | 以太坊Mist负责人教你建立无服务器应用
  • 近期前端发展计划
  • 小而合理的前端理论:rscss和rsjs
  • FaaS 的简单实践
  • 测评:对于写作的人来说,Markdown是你最好的朋友 ...
  • ​TypeScript都不会用,也敢说会前端?
  • (1)SpringCloud 整合Python
  • (C语言)输入一个序列,判断是否为奇偶交叉数
  • (LeetCode 49)Anagrams
  • (超简单)构建高可用网络应用:使用Nginx进行负载均衡与健康检查
  • (动手学习深度学习)第13章 计算机视觉---微调
  • (动态规划)5. 最长回文子串 java解决
  • (二)Eureka服务搭建,服务注册,服务发现
  • (附源码)spring boot校园拼车微信小程序 毕业设计 091617
  • (附源码)springboot“微印象”在线打印预约系统 毕业设计 061642
  • (九)c52学习之旅-定时器
  • (十七)devops持续集成开发——使用jenkins流水线pipeline方式发布一个微服务项目
  • (转)jQuery 基础
  • (转)ORM
  • (转载)CentOS查看系统信息|CentOS查看命令
  • **python多态
  • .axf 转化 .bin文件 的方法
  • .NET CF命令行调试器MDbg入门(一)
  • .Net Winform开发笔记(一)
  • .NET委托:一个关于C#的睡前故事
  • .secret勒索病毒数据恢复|金蝶、用友、管家婆、OA、速达、ERP等软件数据库恢复
  • @Autowired多个相同类型bean装配问题
  • [Android] 修改设备访问权限
  • [Angular] 笔记 18:Angular Router