centos7环境通过rpm包安装mysql8.0.19
Posted reblue520
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7环境通过rpm包安装mysql8.0.19相关的知识,希望对你有一定的参考价值。
centos7环境通过rpm包安装mysql8.0.19
mysql的rpm包下载地址:
http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-8.0/
# 下载mysql8.0.19版本
mysql-community-client-8.0.19-1.el7.x86_64.rpm
mysql-community-common-8.0.19-1.el7.x86_64.rpm
mysql-community-libs-8.0.19-1.el7.x86_64.rpm
mysql-community-server-8.0.19-1.el7.x86_64.rpm
注意安装顺序 common -> libs -> client -> server
rpm -ivh mysql-community-common-8.0.19-1.el8.x86_64.rpm
[root@node1 data]# rpm -ivh mysql-community-server-8.0.19-1.el7.x86_64.rpm
warning: mysql-community-server-8.0.19-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libaio.so.1()(64bit) is needed by mysql-community-server-8.0.19-1.el7.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-8.0.19-1.el7.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-8.0.19-1.el7.x86_64
net-tools is needed by mysql-community-server-8.0.19-1.el7.x86_64
# 解决办法:
yum install net-tools.x86_64 libaio -y
# 初始密码在日志中
[root@node1 data]# more /var/log/mysqld.log
2020-03-12T16:11:00.530337Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 32091
2020-03-12T16:11:08.553289Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Vct!CiL9qlo&
2020-03-12T16:11:12.228434Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 32140
2020-03-12T16:11:13.459708Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-03-12T16:11:13.515224Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: ‘8.0.19‘ socket: ‘/var/lib/mysql/mysql.sock‘ port: 3306 My
SQL Community Server - GPL.
2020-03-12T16:11:13.571225Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: ‘/var/run/mysqld/mysqlx.sock‘ bind-address: ‘::‘ port: 33060
# 修改root密码
mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘Jad(2020‘;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
以上是关于centos7环境通过rpm包安装mysql8.0.19的主要内容,如果未能解决你的问题,请参考以下文章