mysql5.1升级5.6

卸载原有mysql版本

rpm -qa | grep -i mysql | xargs rpm -ev --nodeps

去官网下载最新的社区版mysql5.6版本

官网地址:www.mysql.com



这个tar包里含有许多与MYSQL相关的安装包,需要哪个安装哪个,解压之后的包

mysql5.1升级5.6_第1张图片

安装mysql的服务器端和客户端

rpm -ivh mysql-server-5.6.35-1.el6.x86-64.rpm
rpm -ivh mysql-client-5.6.35-1.el6.x86_64.rpm

安装完之后,将/var/lib/myql目录下的ib*文件重命名或拷贝出来


升级数据库

[root@msl3 ~]# mysql_upgrade --protocol=tcp -P3306 -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--protocol=tcp' '--port=3306'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--protocol=tcp' '--port=3306'
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--protocol=tcp' '--port=3306'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--protocol=tcp' '--port=3306'
Warning: Using a password on the command line interface can be insecure.
OK
启动mysql进程

mysqld_safe &

至此 升级完毕

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29802484/viewspace-2134144/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29802484/viewspace-2134144/

你可能感兴趣的:(mysql5.1升级5.6)