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

MySQL upgrade/update using yum update

sanjay92sanjay92 ContributorCurrent User Role Beginner
Hi,
I have installed MySQL manually using rpm and familiar with process.
However, I would like to know how does yum update process works for MySQL.
Questions :
1. How do I check which MySQL version yum is going to pickup ? How to I know whether it is going to pickup Percona or Community ? How do I check this ?
2. When we do yum update, what process does it follows for mysql upgrade e.g. lets say If I have MySQL 5.5.42-37.1 Percona Server , would it be upgraded to MySQL 5.5.42-37.3 version or 5.6 some version ?
3. Normal upgrade process requires that we unistall previous version and then install new version and do mysql_upgrade process, does yum follows same process.
4. What about backup before upgrade ?


Thanks a lot.

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi Sanjay92;

    Check out the below page from the MySQL manual for more information about upgrading via Yum:
    http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/updating-yum-repo.html

    If Yum sees that you have Community MySQL installed, then it should only upgrade that to other Community MySQL builds, and similar if it sees you have Percona Server installed, it should only upgrade to other Percona Server builds. By default, it should upgrade to a later version in the same series (i.e. if you have 5.5.x, it should upgrade to a newer version of 5.5.x). Though that partly depends on what repositories you have setup on the server, and what yum finds. So when you run any commands with Yum, just make sure to check what it is trying to do before saying "yes". It should tell you the package and the version that it is wanting to install / upgrade to.

    And as usual, make sure to test this on a development server first. =)

    -Scott
  • sanjay92sanjay92 Contributor Current User Role Beginner
    Thanks Scott.
    I am still no clear whether yum update process of mysql is fully automated . I can see it would stop mysql and then uninstall version and install new version but does it run mysql_upgrade .
    Based on manual upgrade process, we need to do following :
    /usr/sbin/mysqld --skip-grant-tables --user=mysql &
    and run mysql_pgrade

    So does yum upgrade process follow about guidelines or we have to do it manually or does these steps are not required when upgrading 5.5.x to 5.5.y.

    Thanks a lot.
  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi sanjay92;

    According to the above link, yum will restart MySQL for you after the upgrade, but then you must run mysql_upgrade yourself. I do not manage MySQL through Yum, so unfortunately I cannot give you any more specific feedback or advice in that area.

    -Scott
  • RanjanRanjan Entrant Current User Role Beginner
    Hi Scott,

    I'm upgrading the percona mysql 5.5 to Percona mysql server 5.6.27-75.0 in ubuntu 14.04 and getting some error. Could you please help me.
  • RanjanRanjan Entrant Current User Role Beginner
    I have done the steps below.
    sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
    echo "deb http://repo.percona.com/apt "$(lsb_release -sc)" main" |sudo tee /etc/apt/source.list.d/percona.list

    echo "deb-src http://repo.percona.com/apt "$(lsb_release -sc)" main" |sudo tee -a /etc/apt/sources.list.d/percona.list

    sudo apt-get update

    apt-get -f install


    Getting error on


    Reading package lists... Done
    W: Duplicate sources.list entry http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages)
    W: Duplicate sources.list entry http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages)
    W: Duplicate sources.list entry http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages (/var/lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_binary-amd64_Packages)
    W: You may want to run apt-get update to correct these problems
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.