CentOS Upgrade MySQL Database 5.6.39

Source: Internet
Author: User
Tags sha1

MySQL Database Upgrade 3.6.39

Preparatory work:
1. Create a new directory (place the upgrade file in this directory)
[Email protected]/]# Mkdir/mysqlbak
[Email protected]/]#
2. Upload the upgraded database version:
. Https://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-5.6.39-1.el7.x86_64.rpm-bundle.tar

3. Unzip
[Email protected] mysqlbak]# tar vxf mysql-5.6.39-1.el7.x86_64.rpm-bundle.tar
mysql-shared-compat-5.6.39-1.el7.x86_64.rpm
mysql-client-5.6.39-1.el7.x86_64.rpm
mysql-devel-5.6.39-1.el7.x86_64.rpm
mysql-server-5.6.39-1.el7.x86_64.rpm
mysql-shared-5.6.39-1.el7.x86_64.rpm
mysql-test-5.6.39-1.el7.x86_64.rpm
mysql-embedded-5.6.39-1.el7.x86_64.rpm

Backing Up the database
Note: Upgrading the database theory does not affect the data, to back up the database for security purposes
[Email protected]/]# mysqldump-uroot-p 3306-p-A >/mysqlbak/dabatases.sql
Enter Password:
You have new mail in/var/spool/mail/root
[Email protected]/]#

Stopping the database
[[Email protected] mysqlbak]# service Crond stop
Redirecting To/bin/systemctl Stop Crond.service
You have new mail in/var/spool/mail/root
[[Email protected] mysqlbak]# service MySQL stop
Shutting down to MySQL ....... ....... success!
[Email protected] mysqlbak]# Netstat-lntup | grep 3306
[Email protected] mysqlbak]#

Delete old version MySQL package files
[email protected] mysqlbak]# Yum remove mysql-share mysql-client mysql-devel mysql-server mysql-shared

install a new MySQL package file
[Email protected] mysqlbak]# RPM-IVH mysql-client-5.6.39-1.el7.x86_64.rpm
Warning:mysql-client-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-client-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-devel-5.6.39-1.el7.x86_64.rpm
Warning:mysql-devel-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-devel-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-embedded-5.6.39-1.el7.x86_64.rpm
Warning:mysql-embedded-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-embedded-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-shared-5.6.39-1.el7.x86_64.rpm
Warning:mysql-shared-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-shared-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-shared-compat-5.6.39-1.el7.x86_64.rpm
Warning:mysql-shared-compat-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-shared-compat-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-test-5.6.39-1.el7.x86_64.rpm
Warning:mysql-test-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-test-5.6.39-1.el7 ################################# [100%]
[Email protected] mysqlbak]# RPM-IVH mysql-server-5.6.39-1.el7.x86_64.rpm
Warning:mysql-server-5.6.39-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey
Preparing ... ################################# [100%]
Updating/installing ...
1:mysql-server-5.6.39-1.el7 ################################# [100%]

Log in after upgrading MySQL
[[email protected] hy]#/etc/init.d/mysql start
Starting MySQL ..... success!
[Email protected] hy]# mysql-uroot-pbjqdsc402
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 8
Server version:5.6.39 MySQL Community Server (GPL)

Copyright (c), 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

mysql> show databases;
+--------------------+
Database
+--------------------+
Mysql
Performance_schema
Test

+--------------------+
7 rows in Set (0.05 sec)

Mysql>select version ();
+-----------+
| Version () |
+-----------+
| 5.6.39 |
+-----------+
1 row in Set (0.08 sec)

Mysql>

CentOS Upgrade MySQL Database 5.6.39

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.