Redhat 6.6 mysql 5.1升级到5.6步骤
注:从mysql 5.1无法通过rpm -U 升级安装到mysql 5.6,需先卸掉mysql-libs,然后再rpm -i安装
需先卸载mysql-libs,不然会报错:file /usr/share/man/man1/my_print_defaults.1.gz from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mysql-5.1.73-3.el6_5.x86_64
# yum remove mysql-libs (会卸掉mysql-libs、cronie、cronie-anacron、crontabs、Perl-DBD-MySQL、mysql、msyql-server、postfix、sysstat)
# rpm -i MySQL-server-5.6.24-1.el6.x86_64.rpm
# rpm -i MySQL-shared-5.6.24-1.el6.x86_64.rpm
# rpm -i MySQL-devel-5.6.24-1.el6.x86_64.rpm
# rpm -i MySQL-client-5.6.24-1.el6.x86_64.rpm
# mv /etc/my.cnf.rpmsave /etc/my.cnf (原有的my.cnf会被改名为my.cnf.rpmsave)
另外升级后需要修复下mysql数据结构(不修复mysqld.log里会有报错的)
# mysql_upgrade -u root -p
输入密码
# service mysql start
转载于:https://blog.51cto.com/yangzhiming/1659832