Page 1 of 1

How to upgrade MySQL to 5.6

Posted: Sun Sep 18, 2016 9:27 am
by KhaoMaNee
Hi,

What is the best way to upgrade MySQL 5.5 to 5.6 on CentOS? I've been searching online but couldn't find a proper solution. Based on "mysql -v", it's 5.5.42 MySQL Community Server (GPL) by Remi . Hope someone can some help, thanks.

Re: How to upgrade MySQL to 5.6

Posted: Wed Sep 28, 2016 12:36 pm
by skurudo
CentOS 6 guide look so.

Stop MySQL:

Code: Select all

# service mysqld stop
Make backup copy of bases MySQL:

Code: Select all

# mkdir /var/lib/mysqlcopy
# cp -aR /var/lib/mysql/* /var/lib/mysqlcopy
Disable Atomic repo, if enabled

Code: Select all

# vi atomic.repo
  enabled = 0
Add MySQL-community repo:

Code: Select all

# yum install http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
Disable update to 5.7, enable 5.6 version:

Code: Select all

# vi /etc/yum.repos.d/mysql-community.repo
  [mysql56-community]
  enabled=1
  [mysql57-community]
  enabled=0
Install MySQL:

Code: Select all

# yum install mysql
Start MySQL service:

Code: Select all

# service mysqld start
Update databases:

Code: Select all

# mysql_upgrade -uroot

Re: How to upgrade MySQL to 5.6

Posted: Fri Sep 30, 2016 5:35 am
by KhaoMaNee
Thank you very much. I will try this.
update: It's working fine, issue resolved (Server must be restarted). Thanks.

Re: How to upgrade MySQL to 5.6

Posted: Thu Jan 05, 2017 4:32 pm
by ddeveloper
I've been looking for a similar solution for CentOS 7. I've once broken the whole server trying to upgrade which cost me 2 hours of extra time to rebuild, upload and setup the websites back.

Is there anyone who has successfully upgraded to Mysql 5.6 successfully?

This is my database version info
Server version: 5.5.52-MariaDB MariaDB Server
* Server is running latest version of Vestacp.

Re: How to upgrade MySQL to 5.6

Posted: Sat Jan 14, 2017 1:41 am
by xorro
Here is the complete tutorial
viewtopic.php?f=14&t=13617

Re: How to upgrade MySQL to 5.6

Posted: Tue Jan 17, 2017 10:09 pm
by skamasle
ddeveloper wrote:I've been looking for a similar solution for CentOS 7. I've once broken the whole server trying to upgrade which cost me 2 hours of extra time to rebuild, upload and setup the websites back.

Is there anyone who has successfully upgraded to Mysql 5.6 successfully?

This is my database version info
Server version: 5.5.52-MariaDB MariaDB Server
* Server is running latest version of Vestacp.
Problem in your case is than centos 7 not run mysql, centos 7 come whit mariadb so you need upgrade mariadb to mariadb 10 or remove mariadb, and install mysql server, not is good idea, so is better upgrade to mariadb10 whit mariadb repos, is same procedure has upgrade mysql but whit mariadb repos.

Re: How to upgrade MySQL to 5.6

Posted: Fri Jul 17, 2020 2:03 am
by mohsinamer
I need help, I'm using the same tutorial for upgrading to 8.0, but I'm stuck on one thing, the Transaction check throws this error:
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.5.62-1.el6.remi will be obsoleted
---> Package mysql-community-client.x86_64 0:8.0.21-1.el6 will be obsoleting
---> Package mysql-community-libs.x86_64 0:8.0.21-1.el6 will be obsoleting
--> Processing Dependency: mysql-community-common(x86-64) >= 8.0.11 for package: mysql-community-libs-8.0.21-1.el6.x86_64
---> Package mysql-community-libs-compat.x86_64 0:8.0.21-1.el6 will be obsoleting
---> Package mysql-community-server.x86_64 0:8.0.21-1.el6 will be obsoleting
---> Package mysql-libs.x86_64 0:5.5.62-1.el6.remi will be obsoleted
---> Package mysql-server.x86_64 0:5.5.62-1.el6.remi will be obsoleted
---> Package mysql80-community-release.noarch 0:el6-1 will be updated
---> Package mysql80-community-release.noarch 0:el6-3 will be an update
--> Running transaction check
---> Package mysql-community-common.x86_64 0:8.0.21-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================================
Installing:
mysql-community-client x86_64 8.0.21-1.el6 mysql80-community 49 M
replacing mysql.x86_64 5.5.62-1.el6.remi
mysql-community-libs x86_64 8.0.21-1.el6 mysql80-community 4.7 M
replacing mysql-libs.x86_64 5.5.62-1.el6.remi
mysql-community-libs-compat x86_64 8.0.21-1.el6 mysql80-community 1.7 M
replacing mysql-libs.x86_64 5.5.62-1.el6.remi
mysql-community-server x86_64 8.0.21-1.el6 mysql80-community 539 M
replacing mysql-server.x86_64 5.5.62-1.el6.remi
Updating:
mysql80-community-release noarch el6-3 mysql80-community 25 k
Installing for dependencies:
mysql-community-common x86_64 8.0.21-1.el6 mysql80-community 738 k

Transaction Summary
===================================================================================================================================================================================================================
Install 5 Package(s)
Upgrade 1 Package(s)

Total size: 595 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
file /usr/lib64/mysql/libmysqlclient.so.16.0.0 from install of mysql-community-libs-compat-8.0.21-1.el6.x86_64 conflicts with file from package compat-mysql51-5.1.73-1.el6.remi.x86_64
file /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 from install of mysql-community-libs-compat-8.0.21-1.el6.x86_64 conflicts with file from package compat-mysql51-5.1.73-1.el6.remi.x86_64
Please help.