Update MySQL version from 5.1 to 5.5 in CentOS 6.2

前端 未结 8 2143
萌比男神i
萌比男神i 2020-12-04 05:33

I tried to update MySQL from 5.1 to 5.5 in CentOS 6.2. The following is the process I did:

1. rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2. yu         


        
8条回答
  •  一个人的身影
    2020-12-04 05:54

    To list Old MySql

    yum list installed | grep -i mysql
    

    To remove Old MySql

    yum remove mysql mysql-*
    

    Remi Dependency on CentOS 6 and Red Hat (RHEL) 6

    rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    

    Install MySQL server

    yum --enablerepo=remi,remi-test install mysql mysql-server
    

    To list New MySql

    yum list installed | grep -i mysql
    

    start MySql server

    /etc/init.d/mysqld start ## use restart after update

    OR

    service mysqld start ## use restart after update

    chkconfig --levels 235 mysqld on
    

    Last

    mysql_upgrade -u root -p
    

    Now my MySql version is 5.5.32

    Ref:

    http://www.webtatic.com/packages/mysql55/

    http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/

    Hope it help some one

    NOTE: Adding comments from @pim (in comments)

    Just wanted to add that after the upgrade, my crontab was removed as well. Had to reinstall with "yum install vixie-cron" (CentOS 6) 
    

提交回复
热议问题