MySQL安装8.0.16

Redhat7.5 (纯净OS,未安装任何tools)

一、rpm 安装

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

[root@localhost tools]# mysql -V
mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
[root@localhost tools]# rpm -qa|grep mysql
akonadi-mysql-1.9.2-4.el7.x86_64
qt-mysql-4.8.7-2.el7.x86_64
[root@localhost tools]# rpm -e akonadi-mysql
[root@localhost tools]# rpm -e qt-mysql
[root@localhost tools]# rpm -qa|grep mysql
[root@localhost tools]# mysql -V
mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
[root@localhost tools]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost tools]# rm -rf mysql: /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost tools]# whereis mysql

[root@localhost mysql]# tar -xvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
[root@localhost mysql]# 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
error: Failed dependencies:
mysql-community-libs(x86-64) >= 8.0.11 is needed by mysql-community-client-8.0.16-2.el7.x86_64
[root@localhost mysql]# 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
error: Failed dependencies:
mysql-community-client(x86-64) >= 8.0.11 is needed by mysql-community-server-8.0.16-2.el7.x86_64

解决:清除yum里所有mysql依赖包
[root@localhost mysql]# rpm -qa|grep mysql
[root@localhost mysql]# yum remove mysql-libs

[root@localhost mysql]# ls
mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
mysql-community-client-8.0.16-2.el7.x86_64.rpm
mysql-community-common-8.0.16-2.el7.x86_64.rpm
mysql-community-devel-8.0.16-2.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.16-2.el7.x86_64.rpm
mysql-community-libs-8.0.16-2.el7.x86_64.rpm
mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm
mysql-community-server-8.0.16-2.el7.x86_64.rpm
mysql-community-test-8.0.16-2.el7.x86_64.rpm
[root@localhost mysql]# rpm -ivh mysql-community-common-8.0.16-2.el7.x86_64.rpm
[root@localhost mysql]# rpm -ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm
[root@localhost mysql]# rpm -ivh mysql-community-client-8.0.16-2.el7.x86_64.rpm
[root@localhost mysql]# rpm -ivh mysql-community-server-8.0.16-2.el7.x86_64.rpm

[root@localhost mysql]# mysql -V
mysql Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
[root@localhost mysql]#
[root@localhost mysql]# ps -ef|grep mysqld
root 73249 13933 0 19:31 pts/1 00:00:00 grep --color=auto mysqld
[root@localhost mysql]# systemctl start mysqld.service
[root@localhost mysql]# ps -ef|grep mysqld
mysql 73370 1 37 19:32 ? 00:00:00 /usr/sbin/mysqld
root 73414 13933 0 19:32 pts/1 00:00:00 grep --color=auto mysqld

参考:https://blog.csdn.net/u014236541/article/details/78124215

二、yum安装

yum源配置参考:https://blog.csdn.net/weixin_40343504/article/details/82221159
1.下载mysql的repo源
下载地址:https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

2.安装mysql repo rpm
[root@localhost Desktop]# rpm -ivh mysql80-community-release-el7-1.noarch.rpm
安装后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。
3.安装mysql
[root@localhost Desktop]# yum install mysql-server
根据提示安装就可以了

[root@11 mysql]# yum install mysql-community-server Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: mysql-community-common(x86-64) = 8.0.16-1.el7 for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 ---> Package mysql-community-common.x86_64 0:8.0.16-1.el7 will be installed ---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64 ---> Package mysql-community-libs.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64 ---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64 --> Finished Dependency Resolution Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: systemd Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.7)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libsasl2.so.3()(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libc.so.6(GLIBC_2.17)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) You could try using --skip-broken to work around the problem ** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows: 2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit) 2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit) 2:postfix-2.6.6-8.el6.x86_64 has missing requires of mysql-libs
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页