Not the answer you need?
Register and ask your own question!

Upgrade of Percona Server 5.7.12-5 to Percona Server 5.7.20-18

manish.chourasiyamanish.chourasiya EntrantCurrent User Role Novice
Hi, Can somebody guide me with the exact steps to upgrade Percona Server 5.7.12-5 to Percona Server 5.7.20-18. I have to upgrade Percona MySql on production server with replication setup.

Comments

  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hi there, thanks for your question manish.chourasiya Please take a look at this blog post, see if it gives you what you need
    https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/

    If you still have questions, please do come back to us and include details about your environment, perhaps a copy of your my.conf and anything else that could help an engineer understand your specific question.

    Do you have a practice environment? Set something up, as that would not only help you to verify your back ups before starting the upgrade but would also mean you could get confident of the steps and iron out any issues or concerns before you start on production. (You knew that already, I realize, but I wanted to say it anyway as a "responsible community manager" :))
  • manish.chourasiyamanish.chourasiya Entrant Current User Role Novice
    Hi, First of all Thanks a lot for reply.

    I have gone through the link that you mentioned.

    I want to move to Percona Server 5.7.20-18 from Percona Server 5.7.12-5 .

    Since this is a minor upgrade i.e. within the same series so If we go with the approach take the full dump and restore on the new version that will cost a long period down time since data size is huge around 200 GB.

    I have not got any direct suggestion or steps to upgrade to Percona Server 5.7.20-18 from Percona Server 5.7.12-5. I urge for your guidance.

    my.cnf file is attached.

    Thank you.
  • manish.chourasiyamanish.chourasiya Entrant Current User Role Novice
    Hi,

    It is requested kindly update the status.

    Also let me know if you need any information from my end.

    In addition to previous post we are using Ubuntu 14.04.5 LTS on server.

    Thank you
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hello, well I found this post from Scott, he is one of our community moderators and is a reliable source of information https://www.percona.com/forums/quest...a-mysql-server in that he says:
    Minor upgrades are generally as simple as shutting down the server, removing the old binaries, installing the new binaries, starting MySQL, and running mysql_upgrade.

    Also, our CEO Peter Zaitsev wrote this post a while back and it still applies https://www.percona.com/blog/2006/09/04/even-minor-upgrades-are-not-always-safe/

    I suspect that the answer is along those lines, except we'd always say to take a back up too. Nevertheless, let me see if I can get someone to check this over for you and make sure we haven't missed anything.
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hi again, OK, I have consulted the tech teams here and they have said that the above suggestion is good basis for going ahead.

    A working backup is always a good starting point, so don't forget to secure that.

    Also, one of the team walked thru an example of the steps that they'd likely go through if doing the same thing.
    Again, please test the process before running it on production. The more you test, the fewer the surprises, it's good practice in every way :)
    # Stop SQL thread
    mysql> stop slave sql_thread;
    mysql> show global status like 'Slave_open_temp_tables';
    
    # Force dump of buffer pool
    mysql> set global innodb_buffer_pool_dump_at_shutdown=OFF, innodb_buffer_pool_dump_now=ON;
    mysql> show global status like 'Innodb_buffer_pool_dump_status';
    +--------------------------------+--------------------------------------------------+
    | Variable_name                  | Value                                            |
    +--------------------------------+--------------------------------------------------+
    | Innodb_buffer_pool_dump_status | Buffer pool(s) dump completed at 170410 11:01:06 |
    +--------------------------------+--------------------------------------------------+
    1 row in set (0.00 sec)
    
    # Optional flush dirty pages
    mysql> set global innodb_max_dirty_pages_pct=0;
    mysql> show global status like 'Innodb_buffer%dirty';
    +--------------------------------+-------+
    | Variable_name                  | Value |
    +--------------------------------+-------+
    | Innodb_buffer_pool_pages_dirty | 0     |
    | Innodb_buffer_pool_bytes_dirty | 0     |
    +--------------------------------+-------+
    2 rows in set (0.00 sec)
    
    # Stop MySQL
    $ sudo service mysql stop
    
    # Upgrade
    $ sudo yum update Percona-Server-server-57 Percona-Server-client-57 Percona-Server-shared-57 openssl
    or 
    $ sudo yum install Percona-Server-server-57-5.7.20 Percona-Server-client-57-5.7.20 Percona-Server-shared-57-5.7.20 # specific version
    $ sudo yum update openssl
    $ sudo service mysql start
    $ sudo mysql_upgrade -s
    
    # Resume replication
    mysql> start slave; show slave status\G
    
    # Check load of buffer pool
    mysql> select variable_name, if(variable_name='Innodb_buffer_pool_bytes_data', variable_value/pow(1024,3), variable_value) from information_schema.global_status where variable_name in('Innodb_buffer_pool_load_status','Innodb_buffer_pool_bytes_data');
    +--------------------------------+-----------------------------------------------------------------------------------------------+
    | variable_name                  | if(variable_name='Innodb_buffer_pool_bytes_data', variable_value/pow(1024,3), variable_value) |
    +--------------------------------+-----------------------------------------------------------------------------------------------+
    | INNODB_BUFFER_POOL_LOAD_STATUS | Buffer pool(s) load completed at 170410 11:46:22                                              |
    | INNODB_BUFFER_POOL_BYTES_DATA  | 274.97410583496094                                                                            |
    +--------------------------------+-----------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    

    Then after that, if you have a replication scenario:
    • upgrade all slaves except for the backup slave (if it exists)
    • upgrade backup slave (if it exists)
    • promote a slave to master
    • upgrade old master
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.