安装Linux时会自带一些版本较低的MySQL,需将其卸载
先使用一下命令查看MySQL包 : rpm -qa | grep MySQL
有什么东东就使用 rpm -e 包名 ; 一个一个地把他们卸载掉。
如果说在卸载某个东东时提示什么什么已安装时 ,就先把那些东西给卸掉,再卸载上面的那些包。
老版本的MySQL卸载完毕之后就安装MySQL吧。
安装完紧接着启动的时候可能会提示 说启动失败
这时修改 /etc/selinux/config 文件
原文件是:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
注意:将 SELINUX=enforcing 修改为 SELINUX=disabled 即可。