How to upgrade MySQL 5.1 to 5.7
Update
- 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
Background
- 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 http://dev.mysql.com/doc/refman/5.5/en/upgrading.html
- 5.5 -> 5.6 Upgrading MySQL http://dev.mysql.com/doc/refman/5.6/en/upgrading.html
- 5.6 -> 5.7 Upgrading MySQL http://dev.mysql.com/doc/refman/5.7/en/upgrading.html
Preliminary
Steps - How to upgrade
Environment
- 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
Author And Source
この問題について(How to upgrade MySQL 5.1 to 5.7), 我々は、より多くの情報をここで見つけました https://qiita.com/tkprof/items/fdc30b45d2efd250f274著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .