Upgrading MySQL with the MySQL Yum Repository(In Place) to 8.0 version

Upgrading MySQL with the MySQL Yum Repository(In Place)


Database upgrade are day-to-day activity which DBA perform on regular basic either due to EOS or application demand. In today blog , We will discuss about MySQL Database upgrade.Also, You can check our blog for Upgrade MySQL InnoDB Cluster which explain how to upgrade InnoDB Cluster.

Below are the steps followed for upgrading MySQL:


Pre-Requisites:


1. Download the latest patch/installer (RPM file) and upload to MySQL DB servers (if needed.For Yum Reposiroty not needed)


2. Check & Select target Series.


   yum repolist all |grep mysql

[root@mysqlhost01 ~]# yum repolist all |grep mysql
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.


mysql-cluster-7.5-community                                      disabled
mysql-cluster-7.5-community-source                               disabled
mysql-connectors-community                                       enabled:    113
mysql-connectors-community-source                                disabled
mysql-tools-community                                            enabled:     84
mysql-tools-community-source                                     disabled
mysql-tools-preview                                              disabled
mysql-tools-preview-source                                       disabled
mysql55-community                                                disabled
mysql55-community-source                                         disabled
mysql56-community                                                disabled
mysql56-community-source                                         disabled
mysql57-community                                                enabled:    360     
mysql57-community-source                                         disabled
mysql80-community                                                disabled            
mysql80-community-source                                         disabled

NOTE : Currently MySQL 5.7 is enabled in repository and MySQL 8.0 is disabled. We need to enable MySQL 8.0 and disable MySQL 5.7 during the upgrade.

3) Run mysqlcheck with --check-upgrade option to find any possible issue during upgrade.


mysqlcheck -u root -p --all-databases --check-upgrade

[root@mysqlhost01 ~]# mysqlcheck -u root -p --all-databases --check-upgrade
Enter password:
apps.apps_activity_category                        OK
apps.apps_activity_evaluation                      OK
apps.apps_auth_method_type                         OK
apps.apps_authentication_method                    OK
apps.apps_branch_activity_entry                    OK
apps.apps_branch_condition                         OK
apps.apps_comment                                  OK
apps.apps_comment_likes                            OK
apps.apps_comment_session                          OK
apps.apps_competence                               OK
apps.apps_competence_mapping                       OK
apps.apps_configuration                            OK
apps.apps_copy_type                                OK
apps.apps_cr_credential                            OK
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.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
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

sys.sys_config                                     OK

4. There must be no partitioned tables that use a storage engine that does not have native partitioning support. To identify such tables, execute this query:



mysql> SELECT TABLE_SCHEMA, TABLE_NAME
    -> FROM INFORMATION_SCHEMA.TABLES
    -> WHERE ENGINE NOT IN ('innodb', 'ndbcluster')
    -> AND CREATE_OPTIONS LIKE '%partitioned%';
Empty set (0.03 sec)

Such tables should be altered to use an engine which supports native partitioning like InnoDB or the partitions should be removed.
ALTER TABLE <tablename> ENGINE = INNODB;
OR
ALTER TABLE <tablename> REMOVE PARTITIONING;

5. There must be no tables in the MySQL 5.7 mysql system database that have the same name as a table used by the MySQL 8.0 data dictionary. To identify tables with those names, execute this query:


mysql> SELECT TABLE_SCHEMA, TABLE_NAME
    -> FROM INFORMATION_SCHEMA.TABLES
    -> WHERE LOWER(TABLE_SCHEMA) = 'mysql'
    -> and LOWER(TABLE_NAME) IN
    -> (
    -> 'catalogs',
    -> 'character_sets',
    -> 'check_constraints',
    -> 'collations',
    -> 'column_statistics',
    -> 'column_type_elements',
    -> 'columns',
    -> 'dd_properties',
    -> 'events',
    -> 'foreign_key_column_usage',
    -> 'foreign_keys',
    -> 'index_column_usage',
    -> 'index_partitions',
    -> 'index_stats',
    -> 'indexes',
    -> 'parameter_type_elements',
    -> 'parameters',
    -> 'resource_groups',
    -> 'routines',
    -> 'schemata',
    -> 'st_spatial_reference_systems',
    -> 'table_partition_values',
    -> 'table_partitions',
    -> 'table_stats',
    -> 'tables',
    -> 'tablespace_files',
    -> 'tablespaces',
    -> 'triggers',
    -> 'view_routine_usage',
    -> 'view_table_usage'
    -> );
Empty set (0.00 sec)

Any tables reported by the query must be renamed (use RENAME TABLE). This may also entail changes to applications that use the affected tables.

6. There must be no tables that have foreign key constraint names longer than 64 characters. To identify tables with too-long constraint names, execute this query:


Log:
mysql> SELECT TABLE_SCHEMA, TABLE_NAME
    -> FROM INFORMATION_SCHEMA.TABLES
    -> WHERE TABLE_NAME IN
    ->   (SELECT LEFT(SUBSTR(ID,INSTR(ID,'/')+1),
    ->                INSTR(SUBSTR(ID,INSTR(ID,'/')+1),'_ibfk_')-1)
    ->    FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN
    ->    WHERE LENGTH(SUBSTR(ID,INSTR(ID,'/')+1))>64);
Empty set (0.02 sec)

These tables should be altered by dropping the constraint and adding the constraint with an explicit constraint name by ensuring the foreign key constraint name does not exceed 64 chars.

mysql> ALTER TABLE `имя_базы_в_кодировке_утф8_длиной_больше_чем_45имя_азы_в_кодировк` DROP FOREIGN KEY `имя_базы_в_кодировке_утф8_длиной_больше_чем_45имя_азы_в_кодировк_ibfk_1`;
mysql> ALTER TABLE `имя_базы_в_кодировке_утф8_длиной_больше_чем_45имя_азы_в_кодировк` ADD CONSTRAINT FOREIGN KEY FK1 (fld2) REFERENCES t1(fld1);

7.Before upgrading to MySQL 8.0.13 or higher, there must be no table partitions that reside in shared InnoDB tablespaces, which include the system tablespace and general tablespaces. 


Identify table partitions in shared tablespaces by querying INFORMATION_SCHEMA:

If upgrading from MySQL 5.7, run this query:

SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
  WHERE NAME LIKE '%#P#%' AND SPACE_TYPE NOT LIKE 'Single';

If upgrading from an earlier MySQL 8.0 release, run this query:

SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_TABLES
  WHERE NAME LIKE '%#P#%' AND SPACE_TYPE NOT LIKE 'Single';

Move table partitions from shared tablespaces to file-per-table tablespaces using ALTER TABLE ... REORGANIZE PARTITION:

ALTER TABLE table_name REORGANIZE PARTITION partition_name
  INTO (partition_definition TABLESPACE=innodb_file_per_table);

8. Check  upgrade preparedness of the existing MySQL 5.7 server. Upgrade Checker describes how simple it is to run the utility and check if there are any actions that needs to be taken prior to upgrade
   

Install MySQL Shell to run upgrade checker.

mysqlsh root:@localhost:3307 -e "util.checkForServerUpgrade();”
 mysqlsh --uri root@localhost:3306
 mysql-js> util.checkForServerUpgrade("root@localhost:3306");

MySQL  localhost  JS > util.checkForServerUpgrade({"configPath":"/etc/my.cnf"});
The MySQL server at /var%2Flib%2Fmysql%2Fmysql.sock, version 5.7.28 - MySQL
Community Server (GPL), will now be checked for compatibility issues for
upgrade to MySQL 8.0.18...
1) Usage of old temporal type
  No issues found
2) Usage of db objects with names conflicting with new reserved keywords
  No issues found
3) Usage of utf8mb3 charset
    No issues found
4) Table names in the mysql schema conflicting with new tables in 8.0
  No issues found
5) Partitioned tables using engines with non native partitioning
  No issues found
6) Foreign key constraint names longer than 64 characters
  No issues found
7) Usage of obsolete MAXDB sql_mode flag
  No issues found
8) Usage of obsolete sql_mode flags
  No issues found
9) ENUM/SET column definitions containing elements longer than 255 characters
  No issues found
10) Usage of partitioned tables in shared tablespaces
  No issues found
11) Circular directory references in tablespace data file paths
  No issues found
12) Usage of removed functions
  No issues found
13) Usage of removed GROUP BY ASC/DESC syntax
  No issues found
14) Removed system variables for error logging to the system log configuration
  No issues found
15) Removed system variables
  No issues found
16) System variables with new default values
  Warning: Following system variables that are not defined in your
    configuration file will have new default values. Please review if you rely on
    their current values and if so define them before performing upgrade.
  More information:
    https://mysqlserverteam.com/new-defaults-in-mysql-8-0/
  back_log - default value will change
  character_set_server - default value will change from latin1 to utf8mb4
  collation_server - default value will change from latin1_swedish_ci to
    utf8mb4_0900_ai_ci
  event_scheduler - default value will change from OFF to ON
  innodb_autoinc_lock_mode - default value will change from 1 (consecutive) to
    2 (interleaved)
  innodb_flush_method - default value will change from NULL to fsync (Unix),
    unbuffered (Windows)
  innodb_flush_neighbors - default value will change from 1 (enable) to 0
    (disable)
  innodb_max_dirty_pages_pct - default value will change from 75 (%)  90 (%)
  innodb_max_dirty_pages_pct_lwm - default value will change from_0 (%) to 10
    (%)
  innodb_undo_log_truncate - default value will change from OFF to ON
  innodb_undo_tablespaces - default value will change from 0 to 2
  log_bin - default value will change from OFF to ON
  log_error_verbosity - default value will change from 3 (Notes) to 2 (Warning)
  log_slave_updates - default value will change from OFF to ON
  master_info_repository - default value will change from FILE to TABLE
  max_allowed_packet - default value will change from 4194304 (4MB) to 67108864
    (64MB)
  max_error_count - default value will change from 64 to 1024
  optimizer_trace_max_mem_size - default value will change from 16KB to 1MB
  performance_schema_consumer_events_transactions_current - default value will
    change from OFF to ON
  performance_schema_consumer_events_transactions_history - default value will
    change from OFF to ON
  relay_log_info_repository - default value will change from FILE to TABLE
  server_id - default value will change from 0 to 1
  slave_rows_search_algorithms - default value will change from 'INDEX_SCAN,
    TABLE_SCAN' to 'INDEX_SCAN, HASH_SCAN'
  table_open_cache - default value will change from 2000 to 4000
  transaction_write_set_extraction - default value will change from OFF to
    XXHASH64
17) Schema inconsistencies resulting from file removal or corruption
  No issues found
18) Issues reported by 'check table x for upgrade' command
  No issues found
19) New default authentication plugin considerations
  Warning: The new default authentication plugin 'caching_sha2_password' offers
    more secure password hashing than previously used 'mysql_native_password'
    (and consequent improved client connection authentication). However, it also
    has compatibility implications that may affect existing MySQL installations.
    If your MySQL installation must serve pre-8.0 clients and you encounter
    compatibility issues after upgrading, the simplest way to address those
    issues is to reconfigure the server to revert to the previous default
    authentication plugin (mysql_native_password). For example, use these lines
    in the server option file:
    [mysqld]
    default_authentication_plugin=mysql_native_password
    However, the setting should be viewed as temporary, not as a long term or
    permanent solution, because it causes new accounts created with the setting
    in effect to forego the improved authentication security.
    If you are using replication please take time to understand how the
    authentication plugin changes may impact you.
  More information:
    https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-compatibility-issues
    https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-replication
Errors:   0
Warnings: 2
Notices:  0

No fatal errors were found that would prevent an upgrade, but some potential issues were detected. Please ensure that the reported issues are not significant before upgrading.

Upgrade Steps:


1. Stop App servers


2. Backup Server(Snapshot backup)


3. Make sure that application is stopped and there are no connections hitting database using SHOW PROCESSLIST command.


LOG:
mysql> SHOW PROCESSLIST ;
+----+------+-----------+------+---------+------+----------+------------------+
| Id | User | Host      | db   | Command | Time | State    | Info             |
+----+------+-----------+------+---------+------+----------+------------------+
|  5 | root | localhost | NULL | Query   |    0 | starting | SHOW PROCESSLIST |
+----+------+-----------+------+---------+------+----------+------------------+
1 row in set (0.00 sec)






4.. Shut down database.


   Shutdown MySQL server instance using innodb_fast_shutdown option.With a fast or slow shutdown, InnoDB leaves its undo logs and data files in a state that can be dealt with in case of file format differences between releases.
   SET GLOBAL innodb_fast_shutdown = 1;
   mysqladmin -u root -p shutdown
   service mysqld stop

5. Set target Relaese Set.


   yum-config-manager --disable mysql57-community
   yum-config-manager --enable mysql80-community
  
[root@mysqlhost01 ~]# yum-config-manager --disable mysql57-community
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
============================================================================ repo: mysql57-community =============================================================================
[mysql57-community]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6Server
baseurl = http://repo.mysql.com/yum/mysql-5.7-community/el/6/x86_64/
cache = 0
cachedir = /var/cache/yum/x86_64/6Server/mysql57-community
cost = 1000
enabled = 0
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/6Server/mysql57-community/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/6Server/mysql57-community/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
hdrdir = /var/cache/yum/x86_64/6Server/mysql57-community/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid =
metadata_expire = 21600
metalink =
mirrorlist =
mirrorlist_expire = 86400
name = MySQL 5.7 Community Server
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6Server/mysql57-community
pkgdir = /var/cache/yum/x86_64/6Server/mysql57-community/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
username =
[root@mysqlhost01 ~]# yum repolist all |grep mysql
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
mysql-cluster-7.5-community                                      disabled
mysql-cluster-7.5-community-source                               disabled
mysql-connectors-community                                       enabled:    113
mysql-connectors-community-source                                disabled
mysql-tools-community                                            enabled:     84
mysql-tools-community-source                                     disabled
mysql-tools-preview                                              disabled
mysql-tools-preview-source                                       disabled
mysql55-community                                                disabled
mysql55-community-source                                         disabled
mysql56-community                                                disabled
mysql56-community-source                                         disabled
mysql57-community                                                disabled
mysql57-community-source                                         disabled
mysql80-community                                                disabled
mysql80-community-source                                         disabled
[root@mysqlhost01 ~]# yum-config-manager --enable mysql80-community
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
============================================================================ repo: mysql80-community =============================================================================
[mysql80-community]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6Server
baseurl = http://repo.mysql.com/yum/mysql-8.0-community/el/6/x86_64/
cache = 0
cachedir = /var/cache/yum/x86_64/6Server/mysql80-community
cost = 1000
enabled = 1
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/6Server/mysql80-community/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/6Server/mysql80-community/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
hdrdir = /var/cache/yum/x86_64/6Server/mysql80-community/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid =
metadata_expire = 21600
metalink =
mirrorlist =
mirrorlist_expire = 86400
name = MySQL 8.0 Community Server
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6Server/mysql80-community
pkgdir = /var/cache/yum/x86_64/6Server/mysql80-community/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
username =
[root@mysqlhost01 ~]# yum repolist all |grep mysql
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
mysql-cluster-7.5-community                                      disabled
mysql-cluster-7.5-community-source                               disabled
mysql-connectors-community                                       enabled:    113
mysql-connectors-community-source                                disabled
mysql-tools-community                                            enabled:     84
mysql-tools-community-source                                     disabled
mysql-tools-preview                                              disabled
mysql-tools-preview-source                                       disabled
mysql55-community                                                disabled
mysql55-community-source                                         disabled
mysql56-community                                                disabled
mysql56-community-source                                         disabled
mysql57-community                                                disabled
mysql57-community-source                                         disabled
mysql80-community                                                enabled:    127
mysql80-community-source                                         disabled
[root@mysqlhost01 ~]#


6.. Upgarde Mysql Server


    yum update mysql-server
 
[root@mysqlhost01 ~]# yum update mysql-server
Loaded plugins: product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-
              : manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make                                              use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.27-1.el6 will be updated
---> Package mysql-community-server.x86_64 0:8.0.18-1.el6 will be an update
--> Processing Dependency: mysql-community-common(x86-64) = 8.0.18-1.el6 for package: mysql-community-server-                                             8.0.18-1.el6.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.1                                             8-1.el6.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.27-1.el6 will be updated
---> Package mysql-community-client.x86_64 0:8.0.18-1.el6 will be an update
--> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.18-                                             1.el6.x86_64
---> Package mysql-community-common.x86_64 0:5.7.27-1.el6 will be updated
---> Package mysql-community-common.x86_64 0:8.0.18-1.el6 will be an update
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.7.27-1.el6 will be updated
--> Processing Dependency: libmysqlclient.so.20()(64bit) for package: mysql-community-devel-5.7.27-1.el6.x86_                                             64
---> Package mysql-community-libs.x86_64 0:8.0.18-1.el6 will be an update
--> Running transaction check
---> Package mysql-community-devel.x86_64 0:5.7.27-1.el6 will be updated
---> Package mysql-community-devel.x86_64 0:8.0.18-1.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================
 Package                          Arch             Version                 Repository                   Size
=============================================================================================================
Updating:
 mysql-community-server           x86_64           8.0.18-1.el6            mysql80-community           512 M
Updating for dependencies:
 mysql-community-client           x86_64           8.0.18-1.el6            mysql80-community            43 M
 mysql-community-common           x86_64           8.0.18-1.el6            mysql80-community           726 k
 mysql-community-devel            x86_64           8.0.18-1.el6            mysql80-community           7.3 M
 mysql-community-libs             x86_64           8.0.18-1.el6            mysql80-community           4.2 M
Transaction Summary
=============================================================================================================
Upgrade       5 Package(s)
Total download size: 568 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): mysql-community-client-8.0.18-1.el6.x86_64.rpm                                 |  43 MB     00:02
(2/5): mysql-community-common-8.0.18-1.el6.x86_64.rpm                                 | 726 kB     00:00
(3/5): mysql-community-devel-8.0.18-1.el6.x86_64.rpm                                  | 7.3 MB     00:00
(4/5): mysql-community-libs-8.0.18-1.el6.x86_64.rpm                                   | 4.2 MB     00:00
(5/5): mysql-community-server-8.0.18-1.el6.x86_64.rpm                                                                              | 512 MB     00:33
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                      15 MB/s | 568 MB     00:37
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : mysql-community-common-8.0.18-1.el6.x86_64                                                                                            1/10
  Updating   : mysql-community-libs-8.0.18-1.el6.x86_64                                                                                              2/10
  Updating   : mysql-community-client-8.0.18-1.el6.x86_64                                                                                            3/10
  Updating   : mysql-community-server-8.0.18-1.el6.x86_64                                                                                            4/10
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Updating   : mysql-community-devel-8.0.18-1.el6.x86_64                                                                                             5/10
  Cleanup    : mysql-community-devel-5.7.27-1.el6.x86_64                                                                                             6/10
  Cleanup    : mysql-community-server-5.7.27-1.el6.x86_64                                                                                            7/10
  Cleanup    : mysql-community-client-5.7.27-1.el6.x86_64                                                                                            8/10
  Cleanup    : mysql-community-libs-5.7.27-1.el6.x86_64                                                                                              9/10
  Cleanup    : mysql-community-common-5.7.27-1.el6.x86_64                                                                                           10/10
  Verifying  : mysql-community-devel-8.0.18-1.el6.x86_64                                                                                             1/10
  Verifying  : mysql-community-client-8.0.18-1.el6.x86_64                                                                                            2/10
  Verifying  : mysql-community-libs-8.0.18-1.el6.x86_64                                                                                              3/10
  Verifying  : mysql-community-common-8.0.18-1.el6.x86_64                                                                                            4/10
  Verifying  : mysql-community-server-8.0.18-1.el6.x86_64                                                                                            5/10
  Verifying  : mysql-community-client-5.7.27-1.el6.x86_64                                                                                            6/10
  Verifying  : mysql-community-common-5.7.27-1.el6.x86_64                                                                                            7/10
  Verifying  : mysql-community-libs-5.7.27-1.el6.x86_64                                                                                              8/10
  Verifying  : mysql-community-devel-5.7.27-1.el6.x86_64                                                                                             9/10
  Verifying  : mysql-community-server-5.7.27-1.el6.x86_64                                                                                           10/10
Updated:
  mysql-community-server.x86_64 0:8.0.18-1.el6
Dependency Updated:
  mysql-community-client.x86_64 0:8.0.18-1.el6       mysql-community-common.x86_64 0:8.0.18-1.el6       mysql-community-devel.x86_64 0:8.0.18-1.el6
  mysql-community-libs.x86_64 0:8.0.18-1.el6
Complete!
 NOTE: By Default mysql start automatically.
 
Start MySQL Server:
   service mysqld start
    

8.  Verify installed mysql :


yum list installed |grep -i mysql
 [root@mysqlhost01 ~]# yum list installed |grep -i mysql
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Error communicating with server. The message was:
Error Class Code: 6001
Error Class Info:
     RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
     Please see https://access.redhat.com/articles/2979901 for more info.
mysql-community-client.x86_64      8.0.18-1.el6            @mysql80-community
mysql-community-common.x86_64      8.0.18-1.el6            @mysql80-community
mysql-community-devel.x86_64       8.0.18-1.el6            @mysql80-community
mysql-community-libs.x86_64        8.0.18-1.el6            @mysql80-community
mysql-community-libs-compat.x86_64 5.7.27-1.el6            @mysql57-community
mysql-community-server.x86_64      8.0.18-1.el6            @mysql80-community
mysql-shell.x86_64                 8.0.18-1.el6            installed
mysql57-community-release.noarch   el6-10                  @mysql57-community
perl-DBD-MySQL.x86_64              4.013-3.el6             @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
qt-mysql.x86_64                    1:4.6.2-28.el6_5        @rhel-x86_64-server-6
[root@mysqlhost01 ~]#
[root@mysqlhost01 ~]# mysql -v
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.18 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW VARIABLES like 'version';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| version       | 8.0.18 |
+---------------+--------+
1 row in set (0.01 sec)
mysql>
mysql> status;
--------------
mysql  Ver 8.0.18 for Linux on x86_64 (MySQL Community Server - GPL)
Connection id:          13
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         8.0.18 MySQL Community Server - GPL
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8mb4
Conn.  characterset:    utf8mb4
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 23 min 4 sec
Threads: 2  Questions: 18  Slow queries: 0  Opens: 959  Flush tables: 4  Open tables: 70  Queries per second avg: 0.013
--------------
MySQL>

NOTE: As we have upgraded MySQL to 8.0.19 , We need not run mysql_upgrade. In case you are upgrading to 8.0.16 or below, Plase run mysql_upgrade -u <user_id> -p after mysql update.

=================================================================



Comments

Popular posts from this blog

Restart Innodb MySQL Cluster after Complete outage(All node Down)

Oracle Block Corruption - Detection and Resolution

Add or Remove a node in MySQL Innodb Cluster