首页 > 数据库 > MySQL > 正文

MySql 8.0.11安装配置教程

2024-07-24 12:50:14
字体:
来源:转载
供稿:网友

官网地址:https://dev.mysql.com/downloads/mysql/

我这里是RHEL6.5的系统,因此选择RedHat 6 x86,64bit操作系统---下载第一个RPM Bundle即可--mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar。

目前MySQL8.0.11社区版提供了多种多样的安装方式,但是并未发现针对Linux Generic安装包包含的mysql_secure_installation的安装说明。

因此这里使用推荐的RPM安装:

一、mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar解压后有如下7个文件:

-rw-r--r-- 1 root root 28987588 Apr 9 01:06 mysql-community-client-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 672184 Apr 9 01:06 mysql-community-common-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 4443296 Apr 9 01:06 mysql-community-devel-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 2579460 Apr 9 01:06 mysql-community-libs-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 1902676 Apr 9 01:06 mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 395918848 Apr 9 01:07 mysql-community-server-8.0.11-1.el6.x86_64.rpm-rw-r--r-- 1 root root 49092596 Apr 9 01:07 mysql-community-test-8.0.11-1.el6.x86_64.rpm

然后创建mysql用户:

useradd mysqlpasswd mysql

二、安装顺序为:(建议装之前先把之前的mysql相关包全部卸载,rpm -e --nodeps <包名>即可)

[root@python ~]# rpm -ivh mysql-community-common-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-common-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-common ########################################### [100%][root@python ~]# rpm -ivh mysql-community-libs-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-libs-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-libs ########################################### [100%][root@python ~]# rpm -ivh mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] file /usr/lib64/mysql/libmysqlclient.so.16.0.0 from install of mysql-community-libs-compat-8.0.11-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-8.0.1.el6_8.x86_64 file /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 from install of mysql-community-libs-compat-8.0.11-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-8.0.1.el6_8.x86_64[root@python ~]# rpm -e --nodeps mysql-libs-5.1.73-8.0.1.el6_8.x86_64[root@python ~]# rpm -ivh mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-libs-co########################################### [100%][root@python ~]# rpm -ivh mysql-community-server-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-server-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYerror: Failed dependencies: mysql-community-client(x86-64) >= 8.0.0 is needed by mysql-community-server-8.0.11-1.el6.x86_64[root@python ~]# rpm -ivh mysql-community-client-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-client-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-client ########################################### [100%][root@python ~]# rpm -ivh mysql-community-server-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-server-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-server ########################################### [100%][root@python ~]# rpm -ivh mysql-community-devel-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-devel-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... ########################################### [100%] 1:mysql-community-devel ########################################### [100%]^[[A[root@python ~]# rpm -ivh mysql-community-test-8.0.11-1.el6.x86_64.rpmwarning: mysql-community-test-8.0.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYerror: Failed dependencies: perl(JSON) is needed by mysql-community-test-8.0.11-1.el6.x86_64--懒的去装perl了,因此测试套件就不装了。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表