You are on page 1of 9

08/07/2021 Upgrade MySQL Server 5.5 to 5.

7 on Oracle Linux 7 | Wadhah DAOUEHI

About Me Contact Linux Oracle

Wadhah DAOUEHI
ORACLE AND LINUX BLOG: WELCOME

  MENU

Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7


By Wadhah DAOUEHI | May 9, 2019 |Linux, MySQL, Oracle

We are going to upgrade my MySQL server 5.5.62 running on On my Oracle Linux 7 to MySQL
server to 5.7.26.

Table of Contents:
check my current version
Backup my databases
Install the new MySQL server version
Upgrade my data

1. check my current version:


a. We are using Oracle Linux 7:

# cat /etc/oracle-release

Oracle Linux Server release 7.5

# uname -a

Linux MySQL-server 4.1.12-124.18.6.el7uek.x86_64 #2 SMP Wed Aug

b. My Curring MySQL server version is 5.5.62

https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 1/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

# rpm -qa|grep -i mysql

MySQL-server-5.5.62-1.el7.x86_64

MySQL-client-5.5.62-1.el7.x86_64

c. Check my MySQL server status

# mysql -uroot -pmysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.5.62 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rig

Oracle is a registered trademark of Oracle Corporation and/or i


affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current i

mysql> status

mysql Ver 14.14 Distrib 5.5.62, for Linux (x86_64) using readl
Connection id: 2

Current database:

Current user: root@localhost

SSL: Not in use

Current pager: stdout

Using outfile: ''

Using delimiter: ;

Server version: 5.5.62 MySQL Community Server (GPL)

Protocol version: 10

Connection: Localhost via UNIX socket

Server characterset: latin1

Db characterset: latin1

Client characterset: utf8

Conn. characterset: utf8



UNIX socket: /var/lib/mysql/mysql.sock

https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 2/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

Uptime: 1 min 14 sec

Threads: 1 Questions: 9 Slow queries: 0 Opens: 33 Flush tab


mysql>

2. Backup my Databases before the


upgrade:
We have used the mysqldump tool to make a full databases backup:

# mysqldump -uroot -p --routines --events --flush-privileges --

Stop and remove my old MySQL version:

# rpm -e MySQL-server-5.5.62-1.el7.x86_64

# rpm -e MySQL-client-5.5.62-1.el7.x86_64

3. Install the new MySQL server version


5.7.26:
a. We are going to install the MySQL server version 5.7.26

# rpm -Uvh mysql-community-common-5.7.26-1.el7.x86_64.rpm

# rpm -Uvh mysql-community-libs-5.7.26-1.el7.x86_64.rpm

# rpm -Uvh mysql-community-client-5.7.26-1.el7.x86_64.rpm

# rpm -Uvh mysql-community-server-5.7.26-1.el7.x86_64.rpm

b. Check the new client version:


https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 3/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

# mysql -V

mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using Edit

c. Start the new MySQL server:

# systemctl start mysqld

4. Upgrade the MySQL server metadata:


We are going to use the mysql_upgrade command to upgrade the mysql serrver data to the new
version. for more info of mysql_upgrade.

# mysql_upgrade -uroot -p

Enter password:

Checking if update is needed.

Checking server version.

Running queries to upgrade MySQL server.


Checking system database.

mysql.columns_priv OK

mysql.db OK

mysql.engine_cost OK

mysql.event OK

mysql.func OK

mysql.general_log OK

mysql.gtid_executed OK

mysql.help_category OK

mysql.help_keyword OK

mysql.help_relation OK

mysql.help_topic OK

mysql.host OK

mysql.innodb_index_stats OK

mysql.innodb_table_stats OK

https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 4/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

mysql.ndb_binlog_index OK

mysql.plugin OK

mysql.proc OK

mysql.procs_priv OK

mysql.proxies_priv OK

mysql.server_cost OK

mysql.servers OK

mysql.slave_master_info OK

mysql.slave_relay_log_info OK

mysql.slave_worker_info OK

mysql.slow_log OK

mysql.tables_priv OK

mysql.time_zone OK

mysql.time_zone_leap_second OK

mysql.time_zone_name OK

mysql.time_zone_transition OK

mysql.time_zone_transition_type OK

mysql.user OK

Upgrading the sys schema.

Checking databases.

sys.sys_config OK

world_innodb.City OK

world_innodb.Country OK

world_innodb.CountryLanguage OK

Upgrade process completed successfully.

Checking if update is needed.

Check now the new running version:

# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.7.26 MySQL Community Server (GPL)



Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rig
https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 5/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

Oracle is a registered trademark of Oracle Corporation and/or i


affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current i
mysql> status;

mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using Edit
Connection id: 2

Current database:

Current user: root@localhost

SSL: Not in use

Current pager: stdout

Using outfile: ''

Using delimiter: ;

Server version: 5.7.26 MySQL Community Server (GPL)

Protocol version: 10

Connection: Localhost via UNIX socket

Server characterset: latin1

Db characterset: latin1

Client characterset: utf8

Conn. characterset: utf8

UNIX socket: /var/lib/mysql/mysql.sock

Uptime: 37 sec

Threads: 1 Questions: 5 Slow queries: 0 Opens: 105 Flush ta


mysql> exit

Bye

Conclusion:
We have upgraded my MySQL server databases from the version 5.5 to 5.7 on Oracle Linux 7.


« Convert SNAPSHOT STANDBY to Online full backup of MySQL server 5.7 using
PHYSICAL STANDBY 12cR1 the MySQL Enterprise Backup »
https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 6/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

Google+ Facebook

Loading Google+ Comments ...

Oracle ACE Associate

Oracle Certified Expert

Oracle Cloud Infrastructure

https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 7/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

MySQL: Administrator Certified Professional

PostgreSQL: Certified Associate

Recent Posts

Convert Oracle RAConeNode to RAC 19c, Database is administrator managed

Convert Oracle RAC to RAConeNode 19c, Database is administrator managed

Upgrade Oracle Database RAC 2 nodes CDB, 2 PDBs from 19.3 to 19.9

Upgrade Oracle Clusterware GI 19c from 19.3 to 19.9

Upgrade the oracle Opatch

Check Oracle Clusterware patch release

Upgrade Oracle Home 19c (19.3 to 19.9)

Install Oracle Database 19c Silent Mode On Oracle Linux 8

[FATAL] [DBT-06103] The port (5,500) is already in use. ACTION: Specify a free port, Oracle 19c

[WARNING] [INS-08101] Unexpected error while executing the action at state:

‘supportedOSCheck’ 19c on Oracle Linux 8

Install Oracle Database 19c Silent Mode Software Only

Install Oracle database 19c prerequisites on Oracle Linux 8

Install OCI CLI on Oracle Linux 8

Install Oracle Linux 8 update 2 

Get prepared for the Oracle Cloud Infrastructure 2019 Certified Architect Professional
https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 8/9
08/07/2021 Upgrade MySQL Server 5.5 to 5.7 on Oracle Linux 7 | Wadhah DAOUEHI

RAC 12cR2 Cluster Bug: HANG DUE TO HIGH GC INDEX OPERATIONS/ENQ: TX ROW LOCK
CONTENTION WAITS: Bug resolved via Patch 28023081

Patch 26609817: DATABASE RELEASE UPDATE 12.2.0.1.170814 (RAC)

Oracle Cloud Control database Plug-in on the agent in 12cR1

Bug while creating new administrator manager RAC 12cR1 while we have one

Set-UP SELinux security Context of auditd destination on Oracle Linux, RHEL and CentOS

DevOps/DBA n°2: Oracle database EE 18c on Docker Image based on Oracle Linux 7u7

DevOps/DBA n°1: Oracle database EE 19c on Docker Image based on Oracle Linux 7u7

[FATAL] [DBT-11211] 19c DBCA: The AMM option is not allowed while the physical memory is
greater than 4GB

Drop guaranteed restore points: ORA-38781

Upgrade Oracle database from 12c (12.1.0.2) to 19c (19.3.0.0) using the RMAN backup

Install Oracle database 12cR1 RAC 3 nodes on Oracle Linux 6u10

Creation of diskgroup FRA within Oracle 12cR1

Installing Oracle Grid Infrastructure 12cR1 on 3 nodes

Check prerequisites before installing Oracle Grid Infrastructure on 3 nodes

Set UP DNS (for RAC) on Oracle Linux 7

Wadhah DAOUEHI | Powered by Mantra & WordPress.

https://wadhahdaouehi.tn/2019/05/upgrade-mysql-server-5-5-to-5-7-on-oracle-linux-7/ 9/9

You might also like