centos+6.9+安装mysql_centos6.9安装mysql5.7

在centos 6.9 上rpm安装MysqL

环境:

Linux:CentOS release 6.9 64bit

MysqL: mysq-5.7.18

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

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

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

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

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

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

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

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

MysqL-libs-5.1.73-8.el6_8.x86_64

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

error: Failed dependencies:

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

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

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

[root@centos-6 MysqL]#

将依赖包一并删除

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

再次查询是否删除干净

3、同时安装这四个rpm包

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

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

[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

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

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

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

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

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

@H_301_64@service MysqLd stop

MysqLd_safe --skip-grant-tables &

MysqL -uroot -p

>use MysqL;

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

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

FLUSH PRIVILEGES;

service MysqLd restart

MysqL -uroot -proot

SET PASSWORD = PASSWORD('root');

总结

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

如您喜欢交流学习经验,点击链接加入交流1群:1065694478(已满)交流2群:163560250

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值