centos下mysql最新版终于安装成功!备份一下几个关键地方(一)

2015-07-24 08:15:29 · 作者: · 浏览: 4

我本来只是为了搭建简单的LAMP环境,亲自动手,却发现有这么多的问题会发生。(by default7#zbphp.com)

很多地方给的安装Mysql的提示是通过yum一键安装。shell命令如下:

yum install mysql

yum install mysql-server

yum install mysql-devel

但是,这个命令安装的mysql版本很旧,5.1.0x版本的,官网的Mysql已经是 5.6.x版本了。太旧了,记得08年的时候就出了 5.1的版本了。

坚持安装最新版本的,在MYSQL官网下载rpm-.tar安装包,300MB左右。linux64。

[root@localhost mysqlinstall]# ls 
MySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-devel-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-embedded-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-shared-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-shared-compat-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-test-5.6.19-1.linux_glibc2.5.x86_64.rpm
[root@localhost mysqlinstall]# pwd
/home/default7@zbphp.com/Downloads/mysqlinstall
[root@localhost mysqlinstall]# ?

但是按照网上(CSDN博客、blogcn博客)一步步提示来安装但是总是各种问题,各种问题,无法运行。

最后尝试了很多遍终于安装成功,正常运行:

[root@localhost /]# yum remove mysql
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
No Match for argument: mysql
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Package(s) mysql available, but not installed.
No Packages marked for removal
[root@localhost /]# yum remove mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package MySQL-server.x86_64 0:5.6.19-1.linux_glibc2.5 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch       Version                        Repository     Size
================================================================================
Removing:
 MySQL-server     x86_64     5.6.19-1.linux_glibc2.5        installed     248 M

Transaction Summary
================================================================================
Remove        1 Package(s)

Installed size: 248 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : MySQL-server-5.6.19-1.linux_glibc2.5.x86_64                  1/1 
  Verifying  : MySQL-server-5.6.19-1.linux_glibc2.5.x86_64                  1/1 

Removed:
  MySQL-server.x86_64 0:5.6.19-1.linux_glibc2.5                                 

Complete!
[root@localhost /]# yum remove MySQL-*
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package MySQL-devel.x86_64 0:5.6.19-1.linux_glibc2.5 will be erased
---> Package MySQL-shared.x86_64 0:5.6.19-1.linux_glibc2.5 will be erased
---> Package MySQL-shared-compat.x86_64 0:5.6.19-1.linux_glibc2.5 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

========================================