网站建设知识
MySQL Study之--Percona server 5.5升级5.6
2025-07-22 09:57  点击:0
系统环境:操作系统:CentOS_6.5(64) MySQL: Percona server 5.5(5.6)一、升级的目的 能方面的考量, 修复的bug. 但是在没有充分的测试以前就应用到你的应用中是非常危险的, 因为升级可以能会让你的应用不能正常运作- 也可能引起性能的问题. 此外, 我建议你关注MySQL的发布信息和Percona Server - 看看最近的版本有什么变化. 也许在在最新的版本中已修复了某个你正在烦恼的问题.二、升级的方式 通常情况下,有两中升级方式:直接升级:安装好新版本数据库后,利用已经存在的数据文件夹,同时运行mysql_upgrade脚本来升级。SQL 导出: 从一个较老版本的mysql把数据导出,然后恢复到新版本的数据库中。(利用mysqldump工具)。相比之下,第二种方式更安全些,但是这也会使得升级的过程要慢一些。理论上讲,最安全的方式是:导出所有用户的权限导出所有数据并恢复到新版本数据库中恢复用户权限到新数据库中三、升级的步骤1、安装percona server 5.5[root@cent65 percona-55]# uname -aLinux cent65 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux[root@cent65 ~]# cd /home/mysql/percona-55/[root@cent65 percona-55]# lsPercona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpmPercona-Server-client-55-5.5.46-rel37.5.el6.x86_64.rpmPercona-Server-devel-55-5.5.46-rel37.5.el6.x86_64.rpmPercona-Server-server-55-5.5.46-rel37.5.el6.x86_64.rpmPercona-Server-shared-55-5.5.46-rel37.5.el6.x86_64.rpmPercona-Server-test-55-5.5.46-rel37.5.el6.x86_64.rpm安装percona server与系统自带的mysql冲突,首先卸载系统自带mysql:[root@cent65 percona-55]# rpm -ivh *warning: Percona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYerror: Failed dependencies: MySQL conflicts with mysql-5.1.71-1.el6.x86_64 MySQL-server conflicts with mysql-server-5.1.71-1.el6.x86_64卸载mysql:[root@cent65 percona-55]# rpm -e mysql-server --nodeps[root@cent65 percona-55]# rpm -e mysql --nodeps[root@cent65 percona-55]# rpm -e mysql-devel --nodeps安装percona server:
[root@cent65 percona-55]# rpm -ivh *warning: Percona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing...                ########################################### [100%]   1:Percona-Server-shared-5########################################### [ 17%]   2:Percona-Server-client-5########################################### [ 33%]   3:Percona-Server-server-5########################################### [ 50%]151203 10:57:15 [Note] /usr/sbin/mysqld (mysqld 5.5.46-37.5) starting as process 2537 ...151203 10:57:27 [Note] /usr/sbin/mysqld (mysqld 5.5.46-37.5) starting as process 2546 ...PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/bin/mysqladmin -u root password 'new-password'/usr/bin/mysqladmin -u root -h cent65 password 'new-password'Alternatively you can run:/usr/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default.  This isstrongly recommended for production servers.See the manual for more instructions.Please report any problems at  https://bugs.launchpad.net/percona-server/+filebugPercona recommends that all production deployments be protected with a supportcontract (percona/mysql-suppport/) to ensure the highest uptime,be eligible for hot fixes, and boost your team's productivity.Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.Run the following commands to create these functions:mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SonAME 'libfnv1a_udf.so'"mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SonAME 'libfnv_udf.so'"mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SonAME 'libmurmur_udf.so'"See percona/doc/percona-server/5.5/management/udf_percona_toolkit.html for more details   4:Percona-Server-test-55 ########################################### [ 67%]   5:Percona-Server-devel-55########################################### [ 83%]   6:Percona-Server-55-debug########################################### [100%]
----安装成功 !2、启动mysql server[root@cent65 percona-55]# service mysql startStarting MySQL (Percona Server)....[ OK ][root@cent65 percona-55]# netstat -an |grep :3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN修改用户口令:[root@cent65 percona-55]# mysqladmin -u root password "oracle"mysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: NO)'连接mysql server:[root@cent65 percona-55]# mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 6Server version: 5.5.46-37.5 Percona Server (GPL), Release 37.5, Revision 684ce54Copyright (c) 2009-2015 Percona LLC and/or its affiliatesCopyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || test |+--------------------+4 rows in set (0.00 sec)创建测试库和表:mysql> create database prod;Query OK, 1 row affected (0.00 sec)mysql> use prod;Database changedmysql> create table emp (id int ,name varchar(10));Query OK, 0 rows affected (0.35 sec)mysql> insert into emp values (10,'tom');Query OK, 1 row affected (0.11 sec)mysql> insert into emp values (20,'jerry');Query OK, 1 row affected (0.17 sec)mysql> insert into emp values (30,'rose');Query OK, 1 row affected (0.05 sec)mysql> commit;Query OK, 0 rows affected (0.00 sec)查看表属性:mysql> show create table emp\G*************************** 1. row *************************** Table: empCreate Table: CREATE TABLE `emp` ( `id` int(11) DEFAULT NULL, `name` varchar(10) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin11 row in set (0.00 sec)mysql> select * from emp;+------+-------+| id | name |+------+-------+| 10 | tom || 20 | jerry || 30 | rose |+------+-------+3 rows in set (0.00 sec)二、准备升级percona server5.5到5.6安装percona toolkit工具:首先通过yum(本地库)安装perl软件:[root@cent65 yum.repos.d]# yum install -y perl-IO-Socket-SSL* --enablerepo=c6-media[root@cent65 yum.repos.d]# yum install -y perl-TermReadKey* --enablerepo=c6-media[root@cent65 mysql]# rpm -ivh percona-toolkit-2.2.10-1.noarch.rpmwarning: percona-toolkit-2.2.10-1.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing... ########################################### [100%] 1:percona-toolkit ########################################### [100%]1) 获取用户和权限信息. 该操作会备份所有用户的权限[root@cent65 mysql]# pt-show-grants --user=root --ask-pass --flush >/home/mysql/grants.sqlEnter password:查看sql scripts:[root@cent65 mysql]# cat grants.sql
- Grants dumped by pt-show-grants-- Dumped from server Localhost via UNIX socket, MySQL 5.5.46-37.5 at 2015-12-03 12:22:00-- Grants for ''@'cent65'GRANT ALTER, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `test\_%`.* TO ''@'%';GRANT ALTER, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `test`.* TO ''@'%';GRANT USAGE ON *.* TO ''@'cent65';-- Grants for ''@'localhost'GRANT ALTER, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `test\_%`.* TO ''@'%';GRANT ALTER, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `test`.* TO ''@'%';GRANT USAGE ON *.* TO ''@'localhost';-- Grants for 'root'@'127.0.0.1'GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION;-- Grants for 'root'@'::1'GRANT ALL PRIVILEGES ON *.* TO 'root'@'::1' WITH GRANT OPTION;-- Grants for 'root'@'cent65'GRANT ALL PRIVILEGES ON *.* TO 'root'@'cent65' WITH GRANT OPTION;GRANT PROXY ON ''@'' TO 'root'@'cent65' WITH GRANT OPTION;-- Grants for 'root'@'localhost'GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*2447D497B9A6A15F2776055CB2D1E9F86758182F' WITH GRANT OPTION;GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION;FLUSH PRIVILEGES;
2)、dump 5.5数据库实例的所有信息(除去mysql, information_schema 和performance_schema数据库)[root@cent65 mysql]# mysql -uroot -p -BNe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mysql', 'performance_schema', 'information_schema')" | tr 'n' ' ' > /home/mysql/dbs-to-dump.sqlEnter password:查看sql scripts:[root@cent65 mysql]# cat dbs-to-dump.sqlprodtest[root@cent65 mysql]# mysqldump -u root -p --routines --events --single-transaction --databases $(cat /home/mysql/dbs-to-dump.sql) > /home/mysql/full-data-dump.sqlEnter password:[root@cent65 mysql]# cat full-data-dump.sql
-- MySQL dump 10.13  Distrib 5.5.46-37.5, for Linux (x86_64)---- Host: localhost    Database: prod-- -------------------------------------------------------- Server version       5.5.46-37.5;;;;;;;;;;-- Current Database: `prod`CREATE DATAbase  `prod` ;USE `prod`;-- Table structure for table `emp`DROP TABLE IF EXISTS `emp`;;;CREATE TABLE `emp` (  `id` int(11) DEFAULT NULL,  `name` varchar(10) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1;;-- Dumping data for table `emp`LOCK TABLES `emp` WRITE;;INSERT INTO `emp` VALUES (10,'tom'),(20,'jerry'),(30,'rose');;UNLOCK TABLES;-- Dumping events for database 'prod'-- Dumping routines for database 'prod'-- Current Database: `test`CREATE DATAbase  `test` ;USE `test`;-- Dumping events for database 'test'-- Dumping routines for database 'test';;;;;;;;-- Dump completed on 2015-12-03 12:31:52
3)、停止数据库[root@cent65 mysql]# service mysql stopShutting down MySQL (Percona Server).......[ OK ][root@cent65 mysql]# mv /var/lib/mysql /var/lib/mysql554)、 移动旧数据库(5.5版本)的数据目录(假设是/var/lib/mysql,此处应该改为你自己的数据目录)[root@cent65 mysql]#mv /var/lib/mysql /var/lib/mysql55[root@cent65 mysql]#mkdir /var/lib/mysql[root@cent65 mysql]#chown -R mysql:mysql /var/lib/mysql三、安装Percona Server 5.6[root@cent65 percona-56]# ls -ltotal 121104-rwxr-xr-x. 1 mysql mysql 70389368 Dec 3 11:21 Percona-Server-56-debuginfo-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 6727084 Dec 3 11:21 Percona-Server-client-56-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 1031588 Dec 3 11:21 Percona-Server-devel-56-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 20463420 Dec 3 11:21 Percona-Server-server-56-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 742496 Dec 3 11:21 Percona-Server-shared-56-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 23137340 Dec 3 11:21 Percona-Server-test-56-5.6.25-rel73.1.el6.x86_64.rpm-rwxr-xr-x. 1 mysql mysql 1508480 Dec 3 11:21 Percona-Server-tokudb-56-5.6.25-rel73.1.el6.x86_64.rpmPercona server 5.5会与5.6的软件有冲突,所以5.6的安装需要强制安装:[root@cent65 percona-56]# rpm -ivh Percona-Server-shared-56-5.6.25-rel73.1.el6.x86_64.rpm --forcewarning: Percona-Server-shared-56-5.6.25-rel73.1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing... ########################################### [100%] 1:Percona-Server-shared-5########################################### [100%][root@cent65 percona-56]# rpm -ivh Percona-Server-client-56-5.6.25-rel73.1.el6.x86_64.rpm --force --nodepswarning: Percona-Server-client-56-5.6.25-rel73.1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing... ########################################### [100%] 1:Percona-Server-client-5########################################### [100%][root@cent65 percona-56]# rpm -ivh Percona-Server-test-56-5.6.25-rel73.1.el6.x86_64.rpm --force --nodepswarning: Percona-Server-test-56-5.6.25-rel73.1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing... ########################################### [100%] 1:Percona-Server-test-56 ########################################### [100%][root@cent65 percona-56]# rpm -ivh Percona-Server-devel-56-5.6.25-rel73.1.el6.x86_64.rpm --force --nodepswarning: Percona-Server-devel-56-5.6.25-rel73.1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing... ########################################### [100%] 1:Percona-Server-devel-56########################################### [100%]server软件的安装需要先卸载server 5.5:1)、卸载server 5.5[root@cent65 percona-56]# rpm -qa |grep Percona-Server-serverPercona-Server-server-55-5.5.46-rel37.5.el6.x86_64[root@cent65 percona-56]# rpm -e Percona-Server-server-55-5.5.46-rel37.5.el6.x86_64error: Failed dependencies: mysql-server is needed by (installed) akonadi-1.2.1-2.el6.x86_64[root@cent65 percona-56]# rpm -e Percona-Server-server-55-5.5.46-rel37.5.el6.x86_64 --nodeps2)、安装server 5.6[root@cent65 percona-56]# rpm -ivh Percona-Server-server* --force --nodeps
warning: Percona-Server-server-56-5.6.25-rel73.1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYPreparing...                ########################################### [100%]   1:Percona-Server-server-5########################################### [100%]2015-12-03 12:41:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2015-12-03 12:41:04 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-73.1) starting as process 4000 ...2015-12-03 12:41:04 4000 [Note] InnoDB: Using atomics to ref count buffer pool pages2015-12-03 12:41:04 4000 [Note] InnoDB: The InnoDB memory heap is disabled2015-12-03 12:41:04 4000 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2015-12-03 12:41:04 4000 [Note] InnoDB: Memory barrier is not used2015-12-03 12:41:04 4000 [Note] InnoDB: Compressed tables use zlib 1.2.32015-12-03 12:41:04 4000 [Note] InnoDB: Using Linux native AIO2015-12-03 12:41:04 4000 [Note] InnoDB: Using CPU crc32 instructions2015-12-03 12:41:04 4000 [Note] InnoDB: Initializing buffer pool, size = 128.0M2015-12-03 12:41:04 4000 [Note] InnoDB: Completed initialization of buffer pool2015-12-03 12:41:04 4000 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2015-12-03 12:41:04 4000 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB2015-12-03 12:41:04 4000 [Note] InnoDB: Database physically writes the file full: wait...2015-12-03 12:41:04 4000 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB2015-12-03 12:41:06 4000 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB2015-12-03 12:41:08 4000 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile02015-12-03 12:41:08 4000 [Warning] InnoDB: New log files created, LSN=457812015-12-03 12:41:08 4000 [Note] InnoDB: Doublewrite buffer not found: creating new2015-12-03 12:41:09 4000 [Note] InnoDB: Doublewrite buffer created2015-12-03 12:41:09 4000 [Note] InnoDB: 128 rollback segment(s) are active.2015-12-03 12:41:09 4000 [Warning] InnoDB: Creating foreign key constraint system tables.2015-12-03 12:41:09 4000 [Note] InnoDB: Foreign key constraint system tables created2015-12-03 12:41:09 4000 [Note] InnoDB: Creating tablespace and datafile system tables.2015-12-03 12:41:09 4000 [Note] InnoDB: Tablespace and datafile system tables created.2015-12-03 12:41:09 4000 [Note] InnoDB: Waiting for purge to start2015-12-03 12:41:09 4000 [Note] InnoDB:  Percona XtraDB (percona) 5.6.25-73.1 started; log sequence number 02015-12-03 12:41:09 4000 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.2015-12-03 12:41:09 4000 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.2015-12-03 12:41:41 4000 [Note] Binlog end2015-12-03 12:41:41 4000 [Note] InnoDB: FTS optimize thread exiting.2015-12-03 12:41:41 4000 [Note] InnoDB: Starting shutdown...2015-12-03 12:41:43 4000 [Note] InnoDB: Shutdown completed; log sequence number 16259772015-12-03 12:41:43 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2015-12-03 12:41:43 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-73.1) starting as process 4025 ...2015-12-03 12:41:43 4025 [Note] InnoDB: Using atomics to ref count buffer pool pages2015-12-03 12:41:43 4025 [Note] InnoDB: The InnoDB memory heap is disabled2015-12-03 12:41:43 4025 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2015-12-03 12:41:43 4025 [Note] InnoDB: Memory barrier is not used2015-12-03 12:41:43 4025 [Note] InnoDB: Compressed tables use zlib 1.2.32015-12-03 12:41:43 4025 [Note] InnoDB: Using Linux native AIO2015-12-03 12:41:43 4025 [Note] InnoDB: Using CPU crc32 instructions2015-12-03 12:41:43 4025 [Note] InnoDB: Initializing buffer pool, size = 128.0M2015-12-03 12:41:43 4025 [Note] InnoDB: Completed initialization of buffer pool2015-12-03 12:41:43 4025 [Note] InnoDB: Highest supported file format is Barracuda.2015-12-03 12:41:44 4025 [Note] InnoDB: 128 rollback segment(s) are active.2015-12-03 12:41:44 4025 [Note] InnoDB: Waiting for purge to start2015-12-03 12:41:44 4025 [Note] InnoDB:  Percona XtraDB (percona) 5.6.25-73.1 started; log sequence number 16259772015-12-03 12:41:44 4025 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.2015-12-03 12:41:44 4025 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.2015-12-03 12:41:44 4025 [Note] Binlog end2015-12-03 12:41:44 4025 [Note] InnoDB: FTS optimize thread exiting.2015-12-03 12:41:44 4025 [Note] InnoDB: Starting shutdown...2015-12-03 12:41:46 4025 [Note] InnoDB: Shutdown completed; log sequence number 1625987PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:  /usr/bin/mysqladmin -u root password 'new-password'  /usr/bin/mysqladmin -u root -h cent65 password 'new-password'Alternatively you can run:  /usr/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default.  This isstrongly recommended for production servers.See the manual for more instructions.Please report any problems at https://bugs.launchpad.net/percona-server/+filebugThe latest information about Percona Server is available on the web at  percona/software/percona-serverSupport Percona by buying support at percona/products/mysql-supportWARNING: Default config file /etc/my.cnf exists on the systemThis file will be read by default by the MySQL serverIf you do not want to use this, either remove it, or use the--defaults-file argument to mysqld_safe when starting the serverPercona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.Run the following commands to create these functions:mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SonAME 'libfnv1a_udf.so'"mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SonAME 'libfnv_udf.so'"mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SonAME 'libmurmur_udf.so'"See percona/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details
------------至此,Percona Server 5.6安装成功 !四、将数据import到server 5.61、启动mysql server[root@cent65 percona-56]# service mysql startStarting MySQL (Percona Server).[ OK ][root@cent65 percona-56]# netstat -an|grep :3306tcp 0 0 :::3306 :::* LISTEN 2、导入用户权限表[root@cent65 percona-56]# mysql -u root -p </home/mysql/grants.sqlEnter password:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)[root@cent65 percona-56]# mysqladmin -u root password "oracle"Warning: Using a password on the command line interface can be insecure.[root@cent65 percona-56]# mysql -u root -p </home/mysql/grants.sqlEnter password:3、导入备份数据[root@cent65 percona-56]# mysql -uroot -p -e "SET GLOBAL max_allowed_packet=1024*1024*1024"Enter password:[root@cent65 percona-56]# mysql -uroot -p --max-allowed-packet=1G < /home/mysql/full-data-dump.sqlEnter password:[root@cent65 percona-56]#5、连接server,验证数据[root@cent65 percona-56]# mysql -uroot -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 6Server version: 5.6.25-73.1 Percona Server (GPL), Release 73.1, Revision 07b797fCopyright (c) 2009-2015 Percona LLC and/or its affiliatesCopyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || prod || test |+--------------------+5 rows in set (0.00 sec)mysql> use prod;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> show tables;+----------------+| Tables_in_prod |+----------------+| emp |+----------------+1 row in set (0.00 sec)查看表信息:mysql> select * from emp;+------+-------+| id | name |+------+-------+| 10 | tom || 20 | jerry || 30 | rose |+------+-------+3 rows in set (0.00 sec)---------数据库可以正常访问,至此升级结束!此时, 所有的表都在MySQL 5.6中重建及重新加载完成,所以所有的二进制文件对MySQL 5.6可用. 同时也你完成了最干净/最稳定的升级过程,你可以恢复你的应用- 这个升级过程和valina MySQL与Percona Server的升级过程是一样的.甚至你可以把Oracle MySQL升级到Percona Server. 比如: 把Oracle MySQL 5.5升级到Percona Server 5.6. 再次强调: MySQL的升级过程和Percona Server的升级过程是一样的,只需要将Percona Server 替换成Oracle MySQL即可.