1. 版本

[root@localhost mysql]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)[root@localhost mysql]# ll
-rw-r--r--. 1 root root  545863680 11月  4 19:55 mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar

2. 解压 mysql

tar -xvf mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar

3. 安装mysql

解压后的

-rw-r--r--. 1 root root  545863680 11月  4 19:55 mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 31415  26664808 9月   8 08:34 mysql-community-client-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415    317808 9月   8 08:34 mysql-community-common-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   4118740 9月   8 08:34 mysql-community-devel-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415  47760636 9月   8 08:34 mysql-community-embedded-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415  23316608 9月   8 08:34 mysql-community-embedded-compat-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 132191192 9月   8 08:34 mysql-community-embedded-devel-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   2473272 9月   8 08:34 mysql-community-libs-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   1263988 9月   8 08:34 mysql-community-libs-compat-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 182267476 9月   8 08:34 mysql-community-server-5.7.36-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 125479900 9月   8 08:35 mysql-community-test-5.7.36-1.el7.x86_64.rpm

安装:rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm  提示: file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64

[root@localhost mysql]# rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-common-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/danish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/dutch/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/english/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/estonian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/french/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/german/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/greek/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/italian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/japanese/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/korean/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/polish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/romanian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/russian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/serbian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/slovak/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/spanish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/swedish/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/Index.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/armscii8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/ascii.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1250.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1251.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1256.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp1257.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp850.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp852.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/cp866.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/dec8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/geostd8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/greek.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/hebrew.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/hp8.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/koi8r.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/koi8u.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin1.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin2.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin5.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/latin7.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/macce.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/macroman.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64file /usr/share/mysql/charsets/swe7.xml from install of mysql-community-common-5.7.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64
[root@localhost mysql]# 

原因:

已经安装  mariadb-libs

[root@localhost mysql]# rpm -qa | grep mariadb-libs
mariadb-libs-5.5.56-2.el7.x86_64

需要卸载 ,mariadb-libs

yum remove -y mariadb-libs-5.5.56-2.el7.x86_64

[root@localhost mysql]# yum remove -y mariadb-libs-5.5.56-2.el7.x86_64
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb-libs.x86_64.1.5.5.56-2.el7 将被 删除
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在检查事务
---> 软件包 postfix.x86_64.2.2.10.1-6.el7 将被 删除
--> 解决依赖关系完成依赖关系解决===============================================================================================================================================Package                           架构                        版本                                   源                                  大小
===============================================================================================================================================
正在删除:mariadb-libs                      x86_64                      1:5.5.56-2.el7                         @anaconda/7.4                      4.4 M
为依赖而移除:postfix                           x86_64                      2:2.10.1-6.el7                         @anaconda/7.4                       12 M事务概要
===============================================================================================================================================
移除  1 软件包 (+1 依赖软件包)安装大小:17 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。正在删除    : 2:postfix-2.10.1-6.el7.x86_64                                                                                              1/2 正在删除    : 1:mariadb-libs-5.5.56-2.el7.x86_64                                                                                         2/2 验证中      : 1:mariadb-libs-5.5.56-2.el7.x86_64                                                                                         1/2 验证中      : 2:postfix-2.10.1-6.el7.x86_64                                                                                              2/2 删除:mariadb-libs.x86_64 1:5.5.56-2.el7                                                                                                           作为依赖被删除:postfix.x86_64 2:2.10.1-6.el7                                                                                                                完毕!
[root@localhost mysql]#

然后依次 安装:

rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm

[root@localhost mysql]# rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-common-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:mysql-community-common-5.7.36-1.e################################# [100%]
[root@localhost mysql]#
[root@localhost mysql]# rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-libs-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:mysql-community-libs-5.7.36-1.el7################################# [100%]
[root@localhost mysql]#
[root@localhost mysql]# rpm -ivh mysql-community-devel-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-devel-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:mysql-community-devel-5.7.36-1.el################################# [100%]
[root@localhost mysql]#
[root@localhost mysql]# rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-client-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:mysql-community-client-5.7.36-1.e################################# [100%]
[root@localhost mysql]#
[root@localhost mysql]# rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm
警告:mysql-community-server-5.7.36-1.el7.x86_64.rpm: 头V3 DSA/SHA256 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:mysql-community-server-5.7.36-1.e################################# [100%]
[root@localhost mysql]#

4. 查看、启动、关闭 mysql

service mysqld status

service mysqld start

service mysqld stop

5. 首次登录 查找密码

grep "temporary password" /var/log/mysqld.log

本次的 密码是 z?u;EkW2Fgfa

6. 登录mysql 修改密码

mysql -u root -p     ##回车,选择自己安装的 提示的密码,z?u;EkW2Fgfa

登录mysql后, 设置密码

ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';

6.  如果有需要 设置其他ip可以登录本机mysql

6.1 登录mysql

[root@localhost ~]# mysql -u root -p
Enter password:

6.2 设置

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql>
mysql> select 'host' from user where user='root';
+------+
| host |
+------+
| host |
+------+
1 row in set (0.00 sec)mysql> update user set host = '%' where user ='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> select 'host'   from user where user='root';
+------+
| host |
+------+
| host |
+------+
1 row in set (0.00 sec)mysql> 

Red Hat Enterprise Linux Server release 7.4 (Maipo) 安装mysql5.7.36相关推荐

  1. Red Hat Enterprise Linux Server release 7.1 (Maipo) 安装gcc 的几种方式

    linux中没有默认安装的gcc,折腾了一番,终于搞好,记录备忘. [root@localhost local]# gcc bash: gcc: command not found... 查看系统版本 ...

  2. AWS EC2 云服务器 Red Hat Enterprise Linux Server release 7.4 (Maipo) vnc远程连接教程

    1.AWS亚马逊云端设置完全访问组TCP连接端口 2.使用xshell登录隧道转发5901端口 选择私有认证秘钥 点击隧道进行配置 3.下载安装redhat 7.4  gnome及配置 #yum up ...

  3. Red Hat Enterprise Linux Server release 6.3下ganglia监控系统的搭建

    ganglia 是分布式的监控系统,有两个Daemon, 分别是:客户端Ganglia Monitoring Daemon (gmond)和服务端Ganglia Meta Daemon (gmetad ...

  4. Red Hat Enterprise Linux Server release 7.0双系统安装

    2019独角兽企业重金招聘Python工程师标准>>> Red Hat Enterprise Linux Server release 7.0双系统安装 1.RedHat 公司的企业 ...

  5. 1-4-RHEL6.3-用户及组管理(Red Hat Enterprise Linux Server release 6.3)@树袋飘零

    本节介绍内容: 1.账户和组的概念 2.账户和组文件阐述与解析 3.管理账户和组(创建删除和修改) 4.案例分析-用户管理和组管理 5.暴力破解RHEL5 shadow 1.账户和组的概念 用户和组的 ...

  6. Red Hat Enterprise Linux Server release 5.6 安装 MongoDB 2.6.4

    1:下载 [jifeng@jifeng04 ~]$ wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz --2 ...

  7. redhat Enterprise Linux Server release 7.2(Maipo) 安装redis-stat

    项目需要在rh7.2安装redis-stat,各种编译不过.通过一步步跟踪编译错误日志发现时缺少各种开发库. 需要安装的库列表如下: zlib-devel openssl-devel readline ...

  8. zzw原创_Red Hat Enterprise Linux Server release 6.5 安装mysql5.5.28版本

    1.查看系统版本 [root@ip12189 ~]#  more /etc/issue Red Hat Enterprise Linux Server release 6.5 (Santiago) K ...

  9. Red Hat Enterprise Linux 7 Release Candidate Now Publicly Available

    2014年4月23日 The Red Hat Enterprise Linux Team As mentioned during Red Hat Summit 2014 last week, we a ...

最新文章

  1. Mysql 操作技巧
  2. 算法笔记-链相关、链的基础、单链双链环链、链的各种功能实现、链的算法题、面试题以及算法优化方法(多)、C#
  3. 算法入门经典习题第一章
  4. 计算机个性化定制服务课题,服务网络的构建与面向增量式需求的动态定制方法-计算机科学与技术专业论文.docx...
  5. delphi 解析一维条码_一维码和二维码区别有哪些
  6. perl 字符串删除末尾几个字符_perl 第六弹 变量 II
  7. Babelfish (关于mapstring,string的用法
  8. Java 中extends与implements使用方法
  9. linux下blast设计引物,Primer-BLAST:NCBI的引物设计和特异性检验工具
  10. 在VirtualBox中安装WindowsXP
  11. 在线运行此php解密navicat导出的密码!(用于navicat已经连接数据库但是忘记了密码)
  12. 计算机3c,计算机3C认证办理介绍
  13. 手把手学习和理解遗传算法的最佳例子
  14. 是非人生 — 一个菜鸟程序员的5年职场路 第24节
  15. python:烤地瓜程序
  16. 制作轮播图经验分享——element ui走马灯的使用(附源码,效果截图)
  17. 升级Mac Catalina后OBS录屏软件麦克风和内置声音输出没有声音的问题
  18. Creator打android包时报Could not resolve all files for configuration ':jcore-react-native:lintClassPath'异
  19. 小白学 Python 爬虫(27):自动化测试框架 Selenium 从入门到放弃(上)
  20. TPLINK AC650双频高增益无线USB网卡 TL-WDN5200H免驱版 Ubuntu16.04 安装

热门文章

  1. Vue ElementUI el-button 修改样式
  2. iOS 系统分享UIActivityViewController,自定义分享预览UI
  3. utf8和utf8mb4的区别详解
  4. Yeelight LED智能灯泡(彩光版)代码控制(含pdf资料)
  5. JWT strings must contain exactly 2 period characters. Found: 0(JWT字符串必须正好包含2个句点字符。找到:0)
  6. 大数据平台Ambari2.7.4+HDP3.1.4安装(超详细教程)
  7. 移动安全--50--Android安全开发编码规范
  8. 移动互联网开发入门Android Studio ,适合刚学习的
  9. 推荐算法工程师,其实是个算命先生!
  10. k1658停运_武汉局集团公司近期临时停运列车的公告