Steps for upgrading to MySQL 5.6.19

Source: Internet
Author: User
Tags localhost mysql

Steps for upgrading to MySQL 5.6.19

Steps for upgrading to MySQL 5.6.19

Pre-upgrade version check + test table Creation
 
[Root @ localhost ~] # Mysql-uroot-p123456 -- socket =/var/lib/mysql/mysql3307.sock -- port = 3307-e "create database lottery; use lottery; create table lottery. mhq as select 'test'; select version ();"
+ ----------- +
| Version () |
+ ----------- +
| 5.6.19-log |
+ ----------- +
[Root @ localhost ~] #

Software Package:
Wget http://downloads.mysql.com/archives/get/file/mysql-community-client-5.7.9-1.el6.x86_64.rpm

Wget http://downloads.mysql.com/archives/get/file/mysql-community-server-5.7.9-1.el6.x86_64.rpm

Wget http://downloads.mysql.com/archives/get/file/mysql-community-common-5.7.9-1.el6.x86_64.rpm
Wget http://downloads.mysql.com/archives/get/file/mysql-community-libs-5.7.9-1.el6.x86_64.rpm

Yum installation command:

Yum install numactl *

Yum localinstall -- skip-broken mysql-community *

Verify version and table data after upgrade

[Root @ localhost ~] # Mysql-uroot-p123456 -- socket =/var/lib/mysql/mysql3307.sock -- port = 3307-EN-e "select version (); select * from lottery. mhq ;"

* *************************** 1. row ***************************
5.7.9-log
* *************************** 1. row ***************************
Test
[Root @ localhost ~] #

Note:

There is no problem in basic query of db tables, but some mysqldump are used to design the system table, and mysql_upgrade is required for the next system table upgrade;

Use mysqldump before Upgrade

[Root @ localhost mysql] # mysqldump-uroot-p123456-B retail_pms>/root/retail_pms. SQL
Mysqldump: Couldn't execute 'show variables like 'gtid \ _ mode'': Native table 'performance _ scheme'. 'session _ variables 'has the wrong structure (1682)
[Root @ localhost mysql] #

Upgrade system table

[Root @ localhost mysql] # mysql_upgrade-u root-p123456 -- socket =/var/lib/mysql/mysql3307.sock -- port = 3307 -- force
Mysql_upgrade: [Warning] Using a password on the command line interface can be insecure.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
Mysql. columns_priv OK
Mysql. db OK
Mysql. engine_cost OK
Mysql. event OK
Mysql. func OK
Mysql. general_log OK
Mysql. gtid_executed OK
Mysql. help_category OK
Mysql. help_keyword OK
Mysql. help_relation OK
Mysql. help_topic OK
Mysql. innodb_index_stats OK
Mysql. innodb_table_stats OK
Mysql. ndb_binlog_index OK
Mysql. plugin OK
Mysql. proc OK
Mysql. procs_priv OK
Mysql. proxies_priv OK
Mysql. server_cost OK
Mysql. servers OK
Mysql. slave_master_info OK
Mysql. slave_relay_log_info OK
Mysql. slave_worker_info 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
Upgrading the sys schema.
Checking databases.
Lottery. mhq OK
Sys. sys_config OK
Upgrade process completed successfully.
Checking if update is needed.

[Root @ localhost mysql] #

Check whether a simple query system table exists:

[Root @ localhost mysql] # find/-name session_variables *
/Var/lib/mysql/performance_schema/session_variables.frm
/Data/wonhigh/mysql3307/performance_schema/session_variables.frm

[Root @ localhost mysql] #

Restart DB

[Root @ localhost ~] # Date; mysqldump-uroot-pW @ h1Gh #2ol5-A -- single-transaction-q-R -- set-gtid-purged = OFF>/data/all. SQL; date
Mysqldump: Couldn't execute 'show variables like 'ndbinfo \ _ version'': Native table 'performance _ scheme '. 'session _ variables 'has the wrong structure (1682) ----> this problem can be solved only by restarting the database ~
[Root @ localhost ~] #

[Root @ localhost mysql] #/etc/init. d/mysqld restart
Stop mysqld: [OK]

Starting mysqld: [OK]

[Root @ localhost mysql] #

Try again to see if mysqldump is successful

[Root @ localhost mysql] # mysqldump-uroot-p123456 retail_pms BRAND COLOR_INFO SHOP_BRAND ITEM>/root/retail_pms. SQL

[Root @ localhost mysql] #

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.