背景介绍:系统版本 centos6.5而且能上网 MySQL版本5.6.20
1.检查MySQL及相关的rpm包安装情况
[root@mysql1 ~]# rpm -qa
|grep -i mysql
mysql-libs-5.1.71-1.el6.x86_64
2.如果有,卸载MySQL
[root@mysql1 ~]# yum -y
remove mysql-libs*
Loaded plugins: fastestmirror,
refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.x86_64
0:5.1.71-1.el6 will be erased
--> Processing Dependency:
libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency:
libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
2:postfix-2.6.6-2.2.el6_1.x86_64
………………
Dependency Removed:
cronie.x86_64 0:1.4.4-12.el6 cronie-anacron.x86_64
0:1.4.4-12.el6
crontabs.noarch 0:1.10-33.el6 postfix.x86_64
2:2.6.6-2.2.el6_1
redhat-lsb.x86_64 0:4.0-7.el6.centos redhat-lsb-compat.x86_64
0:4.0-7.el6.centos
redhat-lsb-core.x86_64 0:4.0-7.el6.centos redhat-lsb-graphics.x86_64
0:4.0-7.el6.centos
redhat-lsb-printing.x86_64 0:4.0-7.el6.centos sysstat.x86_64 0:9.0.4-22.el6
Complete!
3.将MySQL官网下载的rpm包上传的指定的目录下
我这里的目录是/software
[root@mysql1 software]# ls
MySQL-5.6.20-1.linux_glibc2.5.i386.rpm-bundle.tar
由于我 的software目录下只有一个包,所以用*
4.解压MySQL
[root@mysql1 software]# tar -xvf *
MySQL-embedded-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-server-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-devel-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-shared-compat-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-client-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-shared-5.6.20-1.linux_glibc2.5.i386.rpm
MySQL-test-5.6.20-1.linux_glibc2.5.i386.rpm
(用yum install的原因是MySQL的各个包之间有依赖关系,在MySQL5.6.20这个版本是这样的,但在5.6.14版本似乎没有这个问题,这可能与MySQL版本有关,现在暂时是这么猜想的)
5.安装MySQL
[root@mysql1
software]#yum install *
Loaded plugins: fastestmirror,
refresh-packagekit, security
Determining fastest mirrors
* base: mirrors.yun-idc.com
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
Setting up Install Process
No package
MySQL-5.6.20-1.linux_glibc2.5.i386.rpm-bundle.tar available.
Examining</