博客
关于我
CentOS 7下RPM方式安装MySQL8
阅读量:529 次
发布时间:2019-03-08

本文共 4428 字,大约阅读时间需要 14 分钟。

下载地址:https://dev.mysql.com/downloads/mysql/

[root@mysql8 opt]# tar -xvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
mysql-community-libs-8.0.16-2.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.16-2.el7.x86_64.rpm
mysql-community-devel-8.0.16-2.el7.x86_64.rpm
mysql-community-server-8.0.16-2.el7.x86_64.rpm
mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm
mysql-community-client-8.0.16-2.el7.x86_64.rpm
mysql-community-common-8.0.16-2.el7.x86_64.rpm
mysql-community-test-8.0.16-2.el7.x86_64.rpm
[root@mysql8 opt]# ls
mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar        mysql-community-devel-8.0.16-2.el7.x86_64.rpm            mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm  rh
mysql-community-client-8.0.16-2.el7.x86_64.rpm  mysql-community-embedded-compat-8.0.16-2.el7.x86_64.rpm  mysql-community-server-8.0.16-2.el7.x86_64.rpm
mysql-community-common-8.0.16-2.el7.x86_64.rpm  mysql-community-libs-8.0.16-2.el7.x86_64.rpm             mysql-community-test-8.0.16-2.el7.x86_64.rpm
[root@mysql8 opt]# rpm -ivh mysql-community-common-8.0.16-2.el7.x86_64.rpm
warning: mysql-community-common-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-common-8.0.16-2.e################################# [100%]
[root@mysql8 opt]#  rpm -ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm
warning: mysql-community-libs-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
        mariadb-libs is obsoleted by mysql-community-libs-8.0.16-2.el7.x86_64
[root@mysql8 opt]# rpm -q mariadb-libs
mariadb-libs-5.5.60-1.el7_5.x86_64
[root@mysql8 opt]# rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64
error: Failed dependencies:
        libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
[root@mysql8 opt]# rpm -ev mariadb-libs-5.5.60-1.el7_5.x86_64
error: Failed dependencies:
        libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
        libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
[root@mysql8 opt]# rpm -e postfix-2:2.10.1-7.el7.x86_64
[root@mysql8 opt]#  rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64
[root@mysql8 opt]# rpm -ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm
warning: mysql-community-libs-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-libs-8.0.16-2.el7################################# [100%]
[root@mysql8 opt]# rpm -ivh mysql-community-client-8.0.16-2.el7.x86_64.rpm
warning: mysql-community-client-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-client-8.0.16-2.e################################# [100%]
[root@mysql8 opt]#  rpm -ivh mysql-community-server-8.0.16-2.el7.x86_64.rpm
warning: mysql-community-server-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-server-8.0.16-2.e################################# [100%]
[root@mysql8 opt]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
[root@mysql8 opt]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@mysql8 opt]# grep password /var/log/mysqld.log
2019-07-14T20:33:00.077696Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 74f1j>pghmvG
[root@mysql8 opt]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.16

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD = 'StrongPass';
Query OK, 0 rows affected (0.01 sec)

转载地址:http://lfiiz.baihongyu.com/

你可能感兴趣的文章
mysql 查看锁_阿里/美团/字节面试官必问的Mysql锁机制,你真的明白吗
查看>>
MySql 查询以逗号分隔的字符串的方法(正则)
查看>>
MySQL 查询优化:提速查询效率的13大秘籍(避免使用SELECT 、分页查询的优化、合理使用连接、子查询的优化)(上)
查看>>
mysql 查询,正数降序排序,负数升序排序
查看>>
MySQL 树形结构 根据指定节点 获取其下属的所有子节点(包含路径上的枝干节点和叶子节点)...
查看>>
mysql 死锁 Deadlock found when trying to get lock; try restarting transaction
查看>>
mysql 死锁(先delete 后insert)日志分析
查看>>
MySQL 死锁了,怎么办?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 深度分页性能急剧下降,该如何优化?
查看>>
MySQL 添加列,修改列,删除列
查看>>
mysql 添加索引
查看>>
MySQL 添加索引,删除索引及其用法
查看>>
MySQL 用 limit 为什么会影响性能?
查看>>
MySQL 用 limit 为什么会影响性能?有什么优化方案?
查看>>
MySQL 用户权限管理:授权、撤销、密码更新和用户删除(图文解析)
查看>>
mysql 用户管理和权限设置
查看>>
MySQL 的 varchar 水真的太深了!
查看>>
mysql 的GROUP_CONCAT函数的使用(group_by 如何显示分组之前的数据)
查看>>
MySQL 的instr函数
查看>>