在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5

Update MySQL version from 5.1 to 5.5 in CentOS 6.2(在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5)
本文介绍了在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 CentOS 6.2 中将 MySQL 从 5.1 更新到 5.5.以下是我做的过程:

I tried to update MySQL from 5.1 to 5.5 in CentOS 6.2. The following is the process I did:

1. rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2. yum install libmysqlclient15 --enablerepo=webtatic
3. yum remove mysql mysql-*
4. yum install mysql55 mysql55-server --enablerepo=webtatic

当我尝试第四步时,我得到了以下输出:

When I tried the 4th step, I got the following output:

[root@d2005 /]# yum install mysql55 mysql55-server --enablerepo=webtatic
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: yum.singlehop.com
 * extras: centos.mirrors.tds.net
 * updates: pubmirrors.reflected.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql55.x86_64 0:5.5.10-1.w5 will be installed
--> Processing Dependency: mysql55-libs = 5.5.10-1.w5 for package: mysql55-5.5.10-1.w5.x86_64
---> Package mysql55-server.x86_64 0:5.5.10-1.w5 will be installed
--> Processing Dependency: perl-DBD-MySQL for package: mysql55-server-5.5.10-1.w5.x86_64
--> Running transaction check
---> Package mysql55-libs.x86_64 0:5.5.10-1.w5 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.61-1.el6_2.1 will be installed
--> Processing Conflict: mysql55-libs-5.5.10-1.w5.x86_64 conflicts mysql-libs < 5.5.10
--> Finished Dependency Resolution
Error: mysql55-libs conflicts with mysql-libs
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

如何解决?

推荐答案

列出Old MySql

yum list installed | grep -i mysql

删除旧的 MySql

yum remove mysql mysql-*

CentOS 6 和 Red Hat (RHEL) 6 上的 Remi 依赖关系

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

安装 MySQL 服务器

yum --enablerepo=remi,remi-test install mysql mysql-server

列出新的 MySql

yum list installed | grep -i mysql

启动MySql服务器

/etc/init.d/mysqld start ##使用更新后重启

service mysqld start ##使用更新后重启

chkconfig --levels 235 mysqld on

最后

mysql_upgrade -u root -p

现在我的 MySql 版本是 5.5.32

Now my MySql version is 5.5.32

http://www.webtatic.com/packages/mysql55/

http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/

希望对大家有所帮助

注意:从@pim 添加评论(在评论中)

NOTE: Adding comments from @pim (in comments)

Just wanted to add that after the upgrade, my crontab was removed as well. Had to reinstall with "yum install vixie-cron" (CentOS 6) 

这篇关于在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)