在 CentOS 6.2 中将 MySQL 版本从 5.1 更新到 5.5
我尝试在 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
如何修复它?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
列出旧的 MySql
删除旧的 MySql
Remi 对 CentOS 6 和 Red Hat (RHEL) 6 的依赖
安装 MySQL 服务器
列出新的 MySql
启动 MySql 服务器
/etc/init.d/mysqld start
## use restart更新后或
service mysqld start
## 更新后使用重新启动最后
现在我的 MySql 版本是 5.5.32
Ref:
http://www.webtatic.com/packages/mysql55/
http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/
希望对一些人有所帮助一个
注意:
添加来自 @pim 的评论(在评论中)
To list Old MySql
To remove Old MySql
Remi Dependency on CentOS 6 and Red Hat (RHEL) 6
Install MySQL server
To list New MySql
start MySql server
/etc/init.d/mysqld start
## use restart after updateOR
service mysqld start
## use restart after updateLast
Now my MySql version is 5.5.32
Ref:
http://www.webtatic.com/packages/mysql55/
http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/
Hope it help some one
NOTE:
Adding comments from @pim (in comments)
我使用以下命令添加新的 YUM 存储库并进行更新:
下载 Remi 存储库
安装/更新 mysql 版本
或
I used the following commands to add a new YUM repo and make the update:
Download the Remi repo
Install/Update the mysql version
OR
2015/08/19 - 对于那些在具有匹配操作系统(通常是 32 位机器)的旧(但仍然不错)硬件上工作的人。
-- 这将升级到 mysql 5.6 社区而不是 5.5 --
经过一些研究和混合/匹配/测试在互联网各个页面上找到的答案(主要来自此页面和 http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html)。
我的操作系统附带 mysql 5.1,我想要 5.6。
我的系统
安装在 2006 mac pro 1.1 上(CPU 升级到 3.0GHz Intel Xeon X5365 四核)。
我运行的命令
这几乎是在全新安装操作系统并通过 yum 进行系统更新后立即完成的
list mysql 当前安装的
删除已安装的 msql
list mysql 当前安装的
下载包含 mysql 5.6 的 rpm
安装 mysql 列出
当前安装的 mysql
确保 mysql 在重新启动时启动
启动 mysql
结果
mysql 配置(我还没有接触过这个,但信息似乎是合法的)
Some interesting basic but efficient performance tuning for mysql:
https://www.digitalocean .com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories
祝你好运!
编辑
我在创建用户和授予权限时遇到了一些问题,这是如何修复的。
错误
修复
mysql
连接到 mysqlSELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name ='user';
结果是 39,对于 mysql 5.6 预计是 43update mysql.user set Password=PASSWORD('root') where User='root';
exit
注销 mysql)service mysqld restart
mysql -uroot -proot
重新连接到 mysqlSELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';
结果为 43,与 mysql 5.6 的预期一致。然后,我可以创建用户并根据需要授予权限。2015/08/19 - For those of you working on older (but still decent) hardware with a matching OS (typically 32 bit machines).
-- This will upgrade to mysql 5.6 community not 5.5 --
This worked for me after some research and mixing/matching/testing the answers found on various page of the internet (mainly from this page and http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html).
My OS shipped with mysql 5.1, I wanted to have 5.6.
My system
This is installed on a 2006 mac pro 1.1 (CPUs upgraded to 3.0GHz Intel Xeon X5365 Quad-Core).
Commands I ran
This was done almost immediately after a fresh install of the OS and system update via yum
list mysql currently installed
remove installed msql
list mysql currently installed
Download rpm containing mysql 5.6
Install mysql
list mysql currently installed
ensure mysql starts on reboot
Start mysql
Result
mysql config (I did not touch this yet but the info seems legit)
Some interesting basic but efficient performance tuning for mysql:
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories
Good luck!
Edit
I had some issues creating users and granting permissions, this how it was fixed.
Error
Fix
mysql
SELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';
The result was 39, 43 is expected for mysql 5.6update mysql.user set Password=PASSWORD('root') where User='root';
exit
)service mysqld restart
mysql_upgrade -uroot -proot --force
mysql -uroot -proot
SELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';
The result was 43 as expected for mysql 5.6. I was then able to create my users and grant permissions as needed.您似乎使用了错误的 Webtatic Yum 存储库版本,而不是您的 CentOS 版本。请参阅 http://www.webtatic.com/projects/yum-repository/详细信息
例如
您可以使用 IUS 社区制作的 yum 插件来切换 mysql-libs 和 mysql55w-libs。 (以下假设您仍然使用 Webtatic)
这应该允许您用 mysql55w-libs 替换 mysql,同时保留旧的 libmysqlclient 的任何依赖项。
如果您看到除 mysql 之外的其他软件包被删除,那么请小心,因为它们可能是需要的,但是使用这种方法,我发现无论何时使用它都是可靠的。
我发布这个解决方案是因为 Remi 的存储库并不总是理想的解决方案。此方法更复杂,但绝不会导致您通过使用与基础分发包匹配的包名称的存储库意外更新整个 Web 堆栈。
You appear to have been using the wrong Webtatic Yum repository version than the one for your version of CentOS. See http://www.webtatic.com/projects/yum-repository/ for details
e.g.
You can use a yum plugin made by the IUS community to switch mysql-libs with mysql55w-libs. (the following assuming you still use Webtatic)
That should allow you to replace mysql with mysql55w-libs, whilst maintaining the older libmysqlclient for any dependencies.
If you see other packages than mysql being removed, then be careful, as they might be needed, but using this method, I've found to be reliable whenever I've used it.
I'm posting this solution as Remi's repository is not always the ideal solution. This method is more complex, but would never cause you to accidentally update your entire web stack by using repositories that use package names matching base distribution packages.
上面的回复对我不起作用(收到此错误 - 错误:/var/tmp/rpm-tmp.tyukGy:不是 rpm 包)。
我按照以下步骤操作 -
取自 - http://www.howtoing.com/install-mysql-on-rhel-centos-6-5-fedora-17-12/
通过上述操作,我卸载了 MySQL 5.0.* 并将其替换为 -
我的 CentOS 版本 -
Above replies didn't work for me (got this error - error: /var/tmp/rpm-tmp.tyukGy: not an rpm package).
I followed these steps -
Taken from - http://www.tecmint.com/install-mysql-on-rhel-centos-6-5-fedora-17-12/
By doing above, i uninstalled MySQL 5.0.* and replaced it with this -
My CentOS version -
使用 CentOS-Release-SCL 更好、更简单。
软件集合 (SCL) 存储库
完成。
Use CentOS-Release-SCL is better and easy.
The Software Collections ( SCL ) Repository
Done.
此博客帖子帮助我从 MySQL 5.5.15 升级到 5.5.28。该升级还存在
mysql-libs
与mysql55-libs
冲突的问题。This blog post helped me upgrade from MySQL 5.5.15 to 5.5.28. That upgrade also had the problem with
mysql-libs
clashing withmysql55-libs
.