1:也许之前的机器安装过Mysql,但是自己不知道,账号密码也忘记了,又执行安装操作,导致Mysql不兼容问题。Linux上安装MySQL时出现不兼容的解决办法,错误如下所示:
[root@master package]# rpm -ivh MySQL-server-5.1.-.glibc23.i386.rpm
Preparing... ########################################### [%]
file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.1.-.glibc23.i386 conflicts with file from package mysql-libs-5.1.-.el6_8.i686
2:出现问题了,就解决呗,原因是系统已经安装了其他版本的mysql-libs包导致不兼容。
可以使用命令查看yum list | grep mysql,查看之前安装的mysql的信息,如下所示:
[root@master package]# yum list | grep mysql
Repository c6-media is listed more than once in the configuration
mysql-libs.i686 5.1.-.el6_8 @base
apr-util-mysql.i686 1.3.-.el6_0. base
bacula-director-mysql.i686 5.0.-.el6 base
bacula-storage-mysql.i686 5.0.-.el6 base
dovecot-mysql.i686 :2.0.-.el6 base
freeradius-mysql.i686 2.2.-.el6_9 updates
libdbi-dbd-mysql.i686 0.8.-5.1.el6 base
mod_auth_mysql.i686 :3.0.-.el6_0. base
mysql.i686 5.1.-.el6_8 base
mysql-bench.i686 5.1.-.el6_8 base
mysql-connector-java.noarch :5.1.-.el6 base
mysql-connector-odbc.i686 5.1.5r1144-.el6 base
mysql-devel.i686 5.1.-.el6_8 base
mysql-embedded.i686 5.1.-.el6_8 base
mysql-embedded-devel.i686 5.1.-.el6_8 base
mysql-server.i686 5.1.-.el6_8 base
mysql-test.i686 5.1.-.el6_8 base
pcp-pmda-mysql.i686 3.10.-.el6 base
php-mysql.i686 5.3.-.el6 base
qt-mysql.i686 :4.6.-.el6_5 base
rsyslog-mysql.i686 5.8.-.el6_6 base
rsyslog7-mysql.i686 7.4.-.el6 base
3:将之前的mysql的lib包删除了即可,删除mysql-libs:
[root@master package]# yum remove mysql-libs
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.i686 :5.1.-.el6_8 will be erased
--> Processing Dependency: libmysqlclient.so. for package: :postfix-2.6.-.el6.i686
--> Processing Dependency: libmysqlclient.so.(libmysqlclient_16) for package: :postfix-2.6.-.el6.i686
--> Processing Dependency: mysql-libs for package: :postfix-2.6.-.el6.i686
--> Running transaction check
---> Package postfix.i686 :2.6.-.el6 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.-.el6_8..i686
--> Running transaction check
---> Package cronie.i686 :1.4.-.el6_8. will be erased
--> Processing Dependency: cronie = 1.4.-.el6_8. for package: cronie-anacron-1.4.-.el6_8..i686
--> Running transaction check
---> Package cronie-anacron.i686 :1.4.-.el6_8. will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-.el6.noarch
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.-.el6.i686
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch :1.10-.el6 will be erased
---> Package sysstat.i686 :9.0.-.el6 will be erased
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================
Removing:
mysql-libs i686 5.1.-.el6_8 @base 3.9 M
Removing for dependencies:
cronie i686 1.4.-.el6_8. @base k
cronie-anacron i686 1.4.-.el6_8. @base k
crontabs noarch 1.10-.el6 @anaconda-CentOS-.i386/6.4 2.4 k
postfix i686 :2.6.-.el6 @base 9.4 M
sysstat i686 9.0.-.el6 @base k Transaction Summary
===============================================================================================================================================================================================
Remove Package(s) Installed size: M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Repository c6-media is listed more than once in the configuration
Erasing : sysstat-9.0.-.el6.i686 /
Erasing : cronie-anacron-1.4.-.el6_8..i686 /
Erasing : crontabs-1.10-.el6.noarch /
Erasing : cronie-1.4.-.el6_8..i686 /
Erasing : :postfix-2.6.-.el6.i686 /
Erasing : mysql-libs-5.1.-.el6_8.i686 /
warning: erase unlink of /usr/share/mysql/ukrainian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/ukrainian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/swedish/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/swedish failed: No such file or directory
warning: erase unlink of /usr/share/mysql/spanish/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/spanish failed: No such file or directory
warning: erase unlink of /usr/share/mysql/slovak/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/slovak failed: No such file or directory
warning: erase unlink of /usr/share/mysql/serbian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/serbian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/russian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/russian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/romanian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/romanian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/portuguese/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/portuguese failed: No such file or directory
warning: erase unlink of /usr/share/mysql/polish/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/polish failed: No such file or directory
warning: erase unlink of /usr/share/mysql/norwegian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/norwegian-ny/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/norwegian-ny failed: No such file or directory
warning: erase unlink of /usr/share/mysql/norwegian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/korean/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/korean failed: No such file or directory
warning: erase unlink of /usr/share/mysql/japanese/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/japanese failed: No such file or directory
warning: erase unlink of /usr/share/mysql/italian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/italian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/hungarian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/hungarian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/greek/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/greek failed: No such file or directory
warning: erase unlink of /usr/share/mysql/german/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/german failed: No such file or directory
warning: erase unlink of /usr/share/mysql/french/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/french failed: No such file or directory
warning: erase unlink of /usr/share/mysql/estonian/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/estonian failed: No such file or directory
warning: erase unlink of /usr/share/mysql/english/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/english failed: No such file or directory
warning: erase unlink of /usr/share/mysql/dutch/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/dutch failed: No such file or directory
warning: erase unlink of /usr/share/mysql/danish/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/danish failed: No such file or directory
warning: erase unlink of /usr/share/mysql/czech/errmsg.sys failed: No such file or directory
warning: erase unlink of /usr/share/mysql/czech failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/swe7.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/macroman.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/macce.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/latin7.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/latin5.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/latin2.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/latin1.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/koi8u.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/koi8r.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/keybcs2.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/hp8.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/hebrew.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/greek.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/geostd8.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/dec8.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp866.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp852.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp850.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp1257.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp1256.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp1251.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/cp1250.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/ascii.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/armscii8.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/README failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets/Index.xml failed: No such file or directory
warning: erase unlink of /usr/share/mysql/charsets failed: No such file or directory
warning: erase unlink of /usr/share/mysql failed: No such file or directory
warning: erase unlink of /usr/lib/mysql/libmysqlclient_r.so.16.0. failed: No such file or directory
warning: erase unlink of /usr/lib/mysql/libmysqlclient_r.so. failed: No such file or directory
warning: erase unlink of /usr/lib/mysql/libmysqlclient.so.16.0. failed: No such file or directory
warning: erase unlink of /usr/lib/mysql/libmysqlclient.so. failed: No such file or directory
warning: erase unlink of /usr/lib/mysql failed: No such file or directory
Verifying : crontabs-1.10-.el6.noarch /
Verifying : sysstat-9.0.-.el6.i686 /
Verifying : mysql-libs-5.1.-.el6_8.i686 /
Verifying : cronie-1.4.-.el6_8..i686 /
Verifying : cronie-anacron-1.4.-.el6_8..i686 /
Verifying : :postfix-2.6.-.el6.i686 / Removed:
mysql-libs.i686 :5.1.-.el6_8 Dependency Removed:
cronie.i686 :1.4.-.el6_8. cronie-anacron.i686 :1.4.-.el6_8. crontabs.noarch :1.10-.el6 postfix.i686 :2.6.-.el6 sysstat.i686 :9.0.-.el6 Complete!
[root@master package]#
4:然后开始安装你的mysql,在linux操作系统上面:http://www.cnblogs.com/biehongli/p/7693598.html
5:以上方法,亲测可以,下面是更暴力卸载的,看着好像方便些,未测:https://www.cnblogs.com/angelasp/p/4301446.html
停更......
2017-12-09 23:43:43