Spec :

node1 = 172.17.0.2
node2 = 172.17.0.3
node3 = 172.17.0.4

pxc version = 5.5.41-37.0-55-log Percona XtraDB Cluster
OS = Debian wheezy (7.x)

This is steps to doing upgrade percona-xtradb-cluster-5.5 to 5.6. I was try upgrade on the fly but failed the cluster can’t sync because different version of galera lib, So must stop service mysql on all nodes of pxc-5.5 and bootstrap-pxc again.

First step, list all package related with percona-xtradb-cluster-5.5

# dpkg-query -l 'percona*';
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                               Version                Architecture           Description
+++-==================================-======================-======================-=========================================================================
un  percona-server-client-5.1                                                  (no description available)
un  percona-server-client-5.5                                                  (no description available)
ii  percona-server-common-5.5          5.5.50-rel38.0-1.wheez amd64                  Percona Server database common files (e.g. /etc/mysql/my.cnf)
un  percona-server-server-5.1                                                  (no description available)
un  percona-server-server-5.5                                                  (no description available)
ii  percona-xtrabackup                 2.3.5-1.wheezy         amd64                  Open source backup tool for InnoDB and XtraDB
un  percona-xtrabackup-21                                                      (no description available)
un  percona-xtrabackup-22                                                      (no description available)
un  percona-xtradb-client-5.0                                                  (no description available)
ii  percona-xtradb-cluster-55          5.5.41-25.11-853.wheez amd64                  Percona XtraDB Cluster with Galera
ii  percona-xtradb-cluster-client-5.5  5.5.41-25.11-853.wheez amd64                  Percona XtraDB Cluster database client binaries
ii  percona-xtradb-cluster-common-5.5  5.5.41-25.11-853.wheez all                    Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)
un  percona-xtradb-cluster-galera                                              (no description available)
ii  percona-xtradb-cluster-galera-2    1:2.12.2682.wheezy     amd64                  Metapackage for latest version of galera2.
ii  percona-xtradb-cluster-galera-2.x  1:2.12.2682.wheezy     amd64                  Galera components of Percona XtraDB Cluster
un  percona-xtradb-cluster-galera-25                                           (no description available)
ii  percona-xtradb-cluster-server-5.5  5.5.41-25.11-853.wheez amd64                  Percona XtraDB Cluster database server binaries
un  percona-xtradb-server-5.0                                                  (no description available)

Stop service mysql on each node pxc-5.5 one by one

# /etc/init.d/mysql stop
[ ok ] Stopping MySQL (Percona XtraDB Cluster): mysqld.

Remove all packages related with pxc-5.5

# apt-get remove percona-xtradb-cluster-server-5.5 percona-xtradb-cluster-galera-2.x percona-xtradb-cluster-galera-2 percona-xtradb-cluster-common-5.5 percona-xtradb-cluster-client-5.5 percona-xtradb-cluster-55 percona-xtrabackup percona-server-common-5.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  binutils cpp cpp-4.7 gcc gcc-4.7 libaio1 libc-dev-bin libc6-dev libdbd-mysql-perl
  libdbi-perl libev4 libgmp10 libgomp1 libitm1 libmpc2 libmpfr4 libquadmath0 linux-libc-dev
  lsof manpages manpages-dev socat zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libperconaserverclient18 libperconaserverclient18-dev percona-server-common-5.5
  percona-xtrabackup percona-xtradb-cluster-55 percona-xtradb-cluster-client-5.5
  percona-xtradb-cluster-common-5.5 percona-xtradb-cluster-galera-2
  percona-xtradb-cluster-galera-2.x percona-xtradb-cluster-server-5.5
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
After this operation, 118 MB disk space will be freed.
Do you want to continue [Y/n]? Y

# apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  binutils cpp cpp-4.7 gcc gcc-4.7 libaio1 libc-dev-bin libc6-dev libdbd-mysql-perl
  libdbi-perl libev4 libgmp10 libgomp1 libitm1 libmpc2 libmpfr4 libquadmath0 linux-libc-dev
  lsof manpages manpages-dev socat zlib1g-dev
0 upgraded, 0 newly installed, 23 to remove and 39 not upgraded.
After this operation, 69.3 MB disk space will be freed.
Do you want to continue [Y/n]? Y

Doing Upgrade

Install package percona-xtradb-cluster-5.6 one by one per node

# apt-get install percona-xtradb-cluster-56 -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libev4 libnuma1 lsof percona-xtrabackup
  percona-xtradb-cluster-client-5.6 percona-xtradb-cluster-common-5.6
  percona-xtradb-cluster-galera-3 percona-xtradb-cluster-galera-3.x
  percona-xtradb-cluster-server-5.6 socat
Suggested packages:
  tinyca netcat-openbsd pv qpress
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libev4 libnuma1 lsof percona-xtrabackup
  percona-xtradb-cluster-56 percona-xtradb-cluster-client-5.6
  percona-xtradb-cluster-common-5.6 percona-xtradb-cluster-galera-3
  percona-xtradb-cluster-galera-3.x percona-xtradb-cluster-server-5.6 socat
0 upgraded, 14 newly installed, 0 to remove and 39 not upgraded.
Need to get 39.3 MB of archives.
After this operation, 136 MB of additional disk space will be used.

And then open file my.cnf mark line bellow, because was deprecated on release pxc-5.6

innodb_locks_unsafe_for_binlog = 1

Then bootstrap-pxc start from node (the last stop of service mysql)

~# /etc/init.d/mysql bootstrap-pxc
[ ok ] Bootstrapping Percona XtraDB Cluster database server: mysqld ..

Run command mysql_upgrade to examines all tables on all databases for incompatibilities with the current version of percona-xtradb-cluster, mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added

# mysql_upgrade -u root -p
Enter password: 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
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.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.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
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
solusidb.access_tokens                             OK
solusidb.cross_temporary_tokens                    OK
solusidb.delayed_jobs                              OK
solusidb.ip_whitelists                             OK
solusidb.merchants                                 OK
solusidb.old_passwords                             OK
solusidb.roles                                     OK
solusidb.schema_migrations                         OK
solusidb.sessions                                  OK
solusidb.users                                     OK
OK

For next step start service mysql on node2 and node1 alternate and then do mysql_upgrade

# /etc/init.d/mysql start

# mysql_upgrade -u root -p

Finaly run command show status on mysql to check wsrep of cluster with new version of pxc

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.36-82.0-56-log Percona XtraDB Cluster (GPL), Release rel82.0, Revision de7a681, WSREP version 26.20, wsrep_26.20

Copyright (c) 2009-2017 Percona LLC and/or its affiliates
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show status like '%wsrep%';
+------------------------------+-------------------------------------------------+
| Variable_name                | Value                                           |
+------------------------------+-------------------------------------------------+
| wsrep_local_state_uuid       | a8f38ef0-78eb-11e7-85e1-536ad920c921            |
| wsrep_protocol_version       | 7                                               |
| wsrep_last_committed         | 841                                             |
| wsrep_replicated             | 0                                               |
| wsrep_replicated_bytes       | 0                                               |
| wsrep_repl_keys              | 0                                               |
| wsrep_repl_keys_bytes        | 0                                               |
| wsrep_repl_data_bytes        | 0                                               |
| wsrep_repl_other_bytes       | 0                                               |
| wsrep_received               | 2                                               |
| wsrep_received_bytes         | 273                                             |
| wsrep_local_commits          | 0                                               |
| wsrep_local_cert_failures    | 0                                               |
| wsrep_local_replays          | 0                                               |
| wsrep_local_send_queue       | 0                                               |
| wsrep_local_send_queue_max   | 2                                               |
| wsrep_local_send_queue_min   | 0                                               |
| wsrep_local_send_queue_avg   | 0.500000                                        |
| wsrep_local_recv_queue       | 0                                               |
| wsrep_local_recv_queue_max   | 1                                               |
| wsrep_local_recv_queue_min   | 0                                               |
| wsrep_local_recv_queue_avg   | 0.000000                                        |
| wsrep_local_cached_downto    | 0                                               |
| wsrep_flow_control_paused_ns | 0                                               |
| wsrep_flow_control_paused    | 0.000000                                        |
| wsrep_flow_control_sent      | 0                                               |
| wsrep_flow_control_recv      | 0                                               |
| wsrep_cert_deps_distance     | 0.000000                                        |
| wsrep_apply_oooe             | 0.000000                                        |
| wsrep_apply_oool             | 0.000000                                        |
| wsrep_apply_window           | 0.000000                                        |
| wsrep_commit_oooe            | 0.000000                                        |
| wsrep_commit_oool            | 0.000000                                        |
| wsrep_commit_window          | 0.000000                                        |
| wsrep_local_state            | 4                                               |
| wsrep_local_state_comment    | Synced                                          |
| wsrep_cert_index_size        | 0                                               |
| wsrep_cert_bucket_count      | 22                                              |
| wsrep_gcache_pool_size       | 1320                                            |
| wsrep_causal_reads           | 0                                               |
| wsrep_cert_interval          | 0.000000                                        |
| wsrep_incoming_addresses     | 172.17.0.4:3306,172.17.0.3:3306,172.17.0.2:3306 |
| wsrep_desync_count           | 0                                               |
| wsrep_evs_delayed            |                                                 |
| wsrep_evs_evict_list         |                                                 |
| wsrep_evs_repl_latency       | 0.00054281/0.00103473/0.00128215/0.000347841/3  |
| wsrep_evs_state              | OPERATIONAL                                     |
| wsrep_gcomm_uuid             | a9813327-78f8-11e7-9682-97718b75bc11            |
| wsrep_cluster_conf_id        | 9                                               |
| wsrep_cluster_size           | 3                                               |
| wsrep_cluster_state_uuid     | a8f38ef0-78eb-11e7-85e1-536ad920c921            |
| wsrep_cluster_status         | Primary                                         |
| wsrep_connected              | ON                                              |
| wsrep_local_bf_aborts        | 0                                               |
| wsrep_local_index            | 2                                               |
| wsrep_provider_name          | Galera                                          |
| wsrep_provider_vendor        | Codership Oy                |
| wsrep_provider_version       | 3.20(r7e383f7)                                  |
| wsrep_ready                  | ON                                              |
+------------------------------+-------------------------------------------------+
59 rows in set (0.01 sec)

And upgrade pxc done

CMIIW

Source :
howto percona

Advertisements