`
tangjunliang
  • 浏览: 106814 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

centos6.5升级mysql数据库

阅读更多
操作系统:CentOS-6.5-x86_64-minimal

[root@localhost ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)

卸载自带的5.1的mysql-libs包

#rpm -e --nodeps mysql-libs

安装wget

#yum install wget -y

……省略……
Installed:
wget.x86_64 0:1.12-1.8.el6

Complete!
下载5.6的依赖源配置repo rpm文件

#wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

安装repo rpm包

[root@c2 ~]# rpm -ivh mysql-community-release-el6-5.noarch.rpm  
Preparing...                ########################################### [100%] 
   1:mysql-community-release########################################### [100%] 
或者rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

安装mysql-server

[root@c2 ~]# yum install mysql-server mysql-community-devel
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirrors.tuna.tsinghua.edu.cn 
* extras: mirrors.tuna.tsinghua.edu.cn 
* updates: mirrors.163.com 
mysql-connectors-community                                                                                                                                                | 2.5 kB     00:00      
mysql-connectors-community/primary_db  
中间省略

Warning: RPMDB altered outside of yum. 
  Installing : mysql-community-common-5.6.16-1.el6.x86_64                                                                                                                                    1/7  
  Installing : mysql-community-libs-5.6.16-1.el6.x86_64                                                                                                                                      2/7  
  Installing : mysql-community-client-5.6.16-1.el6.x86_64                                                                                                                                    3/7  
  Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                   4/7  
  Installing : mysql-community-server-5.6.16-1.el6.x86_64                                                                                                                                    5/7  
  Installing : mysql-community-libs-compat-5.6.16-1.el6.x86_64                                                                                                                               6/7  
  Erasing    : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                                                7/7  
  Verifying  : mysql-community-libs-compat-5.6.16-1.el6.x86_64                                                                                                                               1/7  
  Verifying  : mysql-community-server-5.6.16-1.el6.x86_64                                                                                                                                    2/7  
  Verifying  : mysql-community-common-5.6.16-1.el6.x86_64                                                                                                                                    3/7  
  Verifying  : mysql-community-libs-5.6.16-1.el6.x86_64                                                                                                                                      4/7  
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                   5/7  
  Verifying  : mysql-community-client-5.6.16-1.el6.x86_64                                                                                                                                    6/7  
  Verifying  : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                                                7/7  
 
Installed: 
  mysql-community-libs.x86_64 0:5.6.16-1.el6                                                     mysql-community-server.x86_64 0:5.6.16-1.el6                                                     
 
Dependency Installed: 
  mysql-community-client.x86_64 0:5.6.16-1.el6      mysql-community-common.x86_64 0:5.6.16-1.el6      mysql-community-libs-compat.x86_64 0:5.6.16-1.el6      perl-DBI.x86_64 0:1.609-4.el6      
 
Replaced: 
  mysql-libs.x86_64 0:5.1.71-1.el6                                                                                                                                                                
 
Complete! 


[root@c2 yum.repos.d]# rpm -qa | grep mysql
mysql-community-release-el6-5.noarch
mysql-community-common-5.6.16-1.el6.x86_64
mysql-community-client-5.6.16-1.el6.x86_64
mysql-community-server-5.6.16-1.el6.x86_64
mysql-community-libs-5.6.16-1.el6.x86_64
mysql-community-devel-5.6.16-1.el6.x86_64

启动mysql-server

#/etc/init.d/mysqld start

客户端连接

[root@localhost ~]# mysql 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 3 
Server version: 5.6.16 MySQL Community Server (GPL) 
 
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 
 
Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
 
mysql>  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics