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

标签 mysql database centos

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

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

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

[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

如何解决?

最佳答案

列出旧的 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

引用:

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

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

希望对大家有所帮助

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

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

关于mysql - 在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9361720/

相关文章:

c# - 将日期时间插入并更新到 SQL 数据库中

android - 无法从 Android sdk 在 linux 机器上安装模拟器

mysql - 在 MySQL 中使用条件查找下一行

php - 如何使用php从html表和mysql表中删除指定行

php - 如何根据 php 中的表值使菜单动态化?

php - 如何在运行时连接到不同的数据库?

MySQL查询和关系表

mysql - 扩展数据库以进行群组/协作消息传递

linux - MySql SeLinux 策略权限

centos - 执行 DB2 命令 '' db2start : command not found ''