centos6.9安装mysql5.7

前端之家收集整理的这篇文章主要介绍了centos6.9安装mysql5.7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

在centos 6.9 上rpm安装MysqL@H_301_1@

环境:@H_301_1@

Linux:CentOS release 6.9 64bit@H_301_1@

MysqL: mysq-5.7.18@H_301_1@

1、在/home创建MysqL目录,下载如下四个软件包@H_301_1@

http://mirrors.sohu.com/MysqL/MysqL-5.7/@H_301_1@

wget http://mirrors.sohu.com/MysqL/MysqL-5.7/MysqL-community-client-5.7.18-1.el6.x86_64.rpm@H_301_1@

wget http://mirrors.sohu.com/MysqL/MysqL-5.7/MysqL-community-common-5.7.18-1.el6.x86_64.rpm@H_301_1@

wget http://mirrors.sohu.com/MysqL/MysqL-5.7/MysqL-community-libs-5.7.18-1.el6.x86_64.rpm@H_301_1@

wget http://mirrors.sohu.com/MysqL/MysqL-5.7/MysqL-community-server-5.7.18-1.el6.x86_64.rpm@H_301_1@

2、检查MysqL rpm相关的包是否安装并去除@H_301_1@

[root@centos-6 MysqL]# rpm -qa | grep -i MysqL@H_301_1@

MysqL-libs-5.1.73-8.el6_8.x86_64@H_301_1@

[root@centos-6 MysqL]# rpm -e MysqL-libs-5.1.73-8.el6_8.x86_64@H_301_1@

error: Failed dependencies:@H_301_1@

libMysqLclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64@H_301_1@

libMysqLclient.so.16(libMysqLclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64@H_301_1@

MysqL-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64@H_301_1@

[root@centos-6 MysqL]#@H_301_1@

将依赖包一并删除@H_301_1@

[root@centos-6 MysqL]# yum remove -y MysqL-libs@H_301_1@

再次查询是否删除干净@H_301_1@

3、同时安装这四个rpm包@H_301_1@

rpm -ivh MysqL-community-client-5.7.18-1.el6.x86_64.rpm MysqL-community-common-5.7.18-1.el6.x86_64.rpm MysqL-community-libs-5.7.18-1.el6.x86_64.rpm MysqL-community-server-5.7.18-1.el6.x86_64.rpm@H_301_1@

4、出现缺少依赖包解决方式@H_301_1@

[root@centos-6 home]# rpm -ivh MysqL-community-client-5.7.18-1.el6.x86_64.rpm MysqL-community-common-5.7.18-1.el6.x86_64.rpm MysqL-community-libs-5.7.18-1.el6.x86_64.rpm MysqL-community-server-5.7.18-1.el6.x86_64.rpm@H_301_1@

warning: MysqL-community-client-5.7.18-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature,key ID 5072e1f5: NOKEY@H_301_1@

libnuma.so.1()(64bit) is needed by MysqL-community-server-5.7.18-1.el6.x86_64@H_301_1@

libnuma.so.1(libnuma_1.1)(64bit) is needed by MysqL-community-server-5.7.18-1.el6.x86_64@H_301_1@

libnuma.so.1(libnuma_1.2)(64bit) is needed by MysqL-community-server-5.7.18-1.el6.x86_64@H_301_1@

[root@centos-6 home]# yum install -y numactl@H_301_1@

service MysqLd stop@H_301_1@

MysqLd_safe --skip-grant-tables &@H_301_1@

MysqL -uroot -p@H_301_1@

>use MysqL;@H_301_1@

> update user set authentication_string=PASSWORD("root") where user="root";@H_301_1@

update user set host='%' where user="root";@H_301_1@

FLUSH PRIVILEGES;@H_301_1@

service MysqLd restart@H_301_1@

MysqL -uroot -proot@H_301_1@

SET PASSWORD = PASSWORD('root');@H_301_1@

猜你在找的CentOS相关文章