博客
关于我
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/

你可能感兴趣的文章
mysql5.7的安装和Navicat的安装
查看>>
mysql5.7示例数据库_Linux MySQL5.7多实例数据库配置
查看>>
Mysql8 数据库安装及主从配置 | Spring Cloud 2
查看>>
mysql8 配置文件配置group 问题 sql语句group不能使用报错解决 mysql8.X版本的my.cnf配置文件 my.cnf文件 能够使用的my.cnf配置文件
查看>>
MySQL8.0.29启动报错Different lower_case_table_names settings for server (‘0‘) and data dictionary (‘1‘)
查看>>
MYSQL8.0以上忘记root密码
查看>>
Mysql8.0以上重置初始密码的方法
查看>>
mysql8.0新特性-自增变量的持久化
查看>>
Mysql8.0注意url变更写法
查看>>
Mysql8.0的特性
查看>>
MySQL8修改密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
查看>>
MySQL8修改密码的方法
查看>>
Mysql8在Centos上安装后忘记root密码如何重新设置
查看>>
Mysql8在Windows上离线安装时忘记root密码
查看>>
MySQL8找不到my.ini配置文件以及报sql_mode=only_full_group_by解决方案
查看>>
mysql8的安装与卸载
查看>>
MySQL8,体验不一样的安装方式!
查看>>
MySQL: Host '127.0.0.1' is not allowed to connect to this MySQL server
查看>>
Mysql: 对换(替换)两条记录的同一个字段值
查看>>
mysql:Can‘t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘解决方法
查看>>