mysql5.1升級5.6

zhangsharp20發表於2017-02-23
解除安裝原有mysql版本

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

去官網下載最新的社群版mysql5.6版本

官網地址:



這個tar包裡含有許多與MYSQL相關的安裝包,需要哪個安裝哪個,解壓之後的包



安裝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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章