How to upgrade MySQL 5.1 to 5.7

업데이트


  • How to update yum repository mysql57-community-dmr --> mysql57-community

  • With mysql57-community-dmr installed, Conflict error occurs like
    yum install http://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
    
    Setting up Install Process
    mysql57-community-release-el6-11.noarch.rpm                                                                  |  25 kB     00:00     
    Examining /var/tmp/yum-root-dWCjk3/mysql57-community-release-el6-11.noarch.rpm: mysql57-community-release-el6-11.noarch
    Marking /var/tmp/yum-root-dWCjk3/mysql57-community-release-el6-11.noarch.rpm to be installed
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql57-community-release.noarch 0:el6-11 will be installed
    --> Processing Conflict: mysql57-community-release-el6-11.noarch conflicts mysql-community-release
    No package matched to upgrade: mysql57-community-release
    --> Finished Dependency Resolution
    Error: mysql57-community-release conflicts with mysql-community-release-el6-7.noarch
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    
  • Fix
  • yum-config-manager --disable mysql57-community-dmr
    
    yum remove mysql-community-release-el6-7.noarch
    yum install http://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
    
    yum-config-manager --enable mysql57-community
    

    배경


  • Conoha Ruby on Rails template uses MySQL 5.1 as of March 2016
  • needs to be upgraded to the latest version MySQL 5.7 quickly !

  • Plan


  • from 5.1 to 5.7 : no direct in-place upgrade path available, so step wise...
  • 5.1 -> 5.5 Upgrading MySQL htp : //에서 v. mysql. 이 m/도 c/레 f만/5.5/엔/우 pg등ぢg. HTML
  • 5.5 -> 5.6 Upgrading MySQL htp : //에서 v. mysql. 이 m/도 c/레 f만/5.6/엔/우 pg등ぢg. HTML
  • 5.6 -> 5.7 Upgrading MySQL htp : //에서 v. mysql. 이 m/도 c/레 f만/5.7/엔/우 pg등 g. HTML


  • Preliminary



    【심플】 CentOS6에 MySQL5.7을 yum으로 간단하게 설치하는 순서
    htp : // bg. y보. 네 t/2015/03/11/호 w--인 s 탓 lmysql5-7-와 - s6-우신 g-유 m/

    Steps - How to upgrade



    환경


  • CentOS 6.7 installed (Red Hat Enterprise Linux Server 6.7)

  • /etc/issue
    CentOS release 6.7 (Final)
    

    yum repository for CentOS 6.x


    yum install http://dev.mysql.com/get/mysql-community-release-el6-11.noarch.rpm
    

    shutdown MySQL 5.1 for upgrade


    mysql -u root -ppassword --execute="set global innodb_fast_shutdown=0"
    mysqladmin -u root -ppassword shutdown
    

    upgrade to MySQL 5.5


    yum-config-manager --disable mysql56-community
    yum-config-manager --enable mysql55-community
    yum update mysql mysql-devel mysql-server mysql-utilities
    

    mysqld_safe && mysql_upgrade - 5.5


    mysqld_safe
    mysql_upgrade -u root -ppassword
    service mysqld stop
    

    upgrade to MySQL 5.6


    yum-config-manager --disable mysql55-community
    yum-config-manager --enable mysql56-community
    yum update mysql mysql-devel mysql-server mysql-utilities
    

    mysqld_safe && mysql_upgrade - 5.6


    mysqld_safe
    mysql_upgrade -u root -ppassword
    service mysqld stop
    

    upgrade to MySQL 5.7


    yum-config-manager --disable mysql56-community
    yum-config-manager --enable mysql57-community
    yum update mysql mysql-devel mysql-server mysql-utilities
    

    mysqld_safe && mysql_upgrade - 5.7


    mysqld_safe
    mysql_upgrade -u root -ppassword
    service mysqld stop
    

    Fin


    mysql --version
    mysql  Ver 14.14 Distrib 5.7.12, for Linux (x86_64)
    

    Done

    좋은 웹페이지 즐겨찾기