博客
关于我
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 让所有IP访问数据库
查看>>
mysql 记录的增删改查
查看>>
MySQL 设置数据库的隔离级别
查看>>
MySQL 证明为什么用limit时,offset很大会影响性能
查看>>
Mysql 语句操作索引SQL语句
查看>>
MySQL 误操作后数据恢复(update,delete忘加where条件)
查看>>
MySQL 调优/优化的 101 个建议!
查看>>
mysql 转义字符用法_MySql 转义字符的使用说明
查看>>
mysql 输入密码秒退
查看>>
mysql 递归查找父节点_MySQL递归查询树状表的子节点、父节点具体实现
查看>>
mysql 里对root及普通用户赋权及更改密码的一些命令
查看>>
Mysql 重置自增列的开始序号
查看>>
MySQL 错误
查看>>
MySQL 面试,必须掌握的 8 大核心点
查看>>
MySQL 高可用性之keepalived+mysql双主
查看>>
MySql-2019-4-21-复习
查看>>
mysql-connector-java各种版本下载地址
查看>>