centos6.9安装mysql5.7
2017-06-20 19:39
483 查看
在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
再次查询是否删除干净
[root@centos-6 mysql]# rpm -qa | grep -i mysql
[root@centos-6 mysql]#
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
error: Failed dependencies:
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
5、mysql数据库设置
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');
环境:
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
再次查询是否删除干净
[root@centos-6 mysql]# rpm -qa | grep -i mysql
[root@centos-6 mysql]#
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
error: Failed dependencies:
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
5、mysql数据库设置
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');
相关文章推荐
- CentOS6.9用rpm安装MySQL5.7
- centos6.9使用二进制包安装mysql5.7
- Centos6.5使用yum安装Mysql5.7
- yum方式安装MySQL5.7-centos6.4 64位
- CentOS7下安装mysql5.7,基于官网教程
- MySQL5.7在CentOS7下安装
- CentOS6.5安装MySQL5.7详细教程
- Centos 安装Mysql5.7
- centos 6.5下rpm yum仓库在线安装mysql5.7 非编译
- CentOS7.2安装MySQL5.7及遇到的坑
- centos6 yum安装最新版mysql5.7
- CentOS 6.5 安装MySQL5.7 RPM
- centos6.5下yum安装最新版本mysql5.7
- centos7.1 yum 安装 MySQL5.7 和 PHP5.6
- CentOS 7安装MYSQL5.7(access denied问题解决方法)
- CentOS7下安装mysql5.7,基于官网教程
- centos下安装MySQL5.7
- centos6.5安装mysql5.7
- linux(centos6) 安装mysql5.7
- CentOS 7 yum 安装 MySQL5.7