• 技术文章 >数据库 >mysql教程

    安装MYSQL错误“conflictswithfilefrompackagemysql-libs-*”解决方法_MySQL

    2016-06-01 13:04:29原创921
    安装MYSQL的时候时:

    错误现象:

    [root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm 
    Preparing...                ########################################### [100%]
    	file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
    	file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

    错误原因:

    原因由包冲突引起的!

    解决方法:

    先移除冲突的libs包,再进行安装。

    yum -y remove mysql-libs-5.1.61*

    -y的意思就是不用询问是否remove卸载完成之后,

    然后再执行命令

    rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
    安装MySQL就可以成功了,如下:

    [root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
    Preparing...                ########################################### [100%]
       1:MySQL-server           ########################################### [100%]
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
    
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
    [root@localhost opt]# 
    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
    专题推荐:错误 方法
    上一篇:【MySQL案例】tpcc测试--执行tpcc_start报错Segmentationfault_MySQL 下一篇:java访问mysql数据库的方法_MySQL
    VIP课程(WEB全栈开发)

    相关文章推荐

    • 【腾讯云】年中优惠,「专享618元」优惠券!• 归纳整理MySQL数据库设计规范• 归纳整理MySQL索引优化知识点• mysql中什么时候用临时表• mysql中pid文件丢失怎么办• mysql启动报错1067怎么办
    1/1

    PHP中文网