Αναβάθμιση δευτερεύουσας έκδοσης MySQL από 8.0.22 σε 8.0.29

4
Αναβάθμιση δευτερεύουσας έκδοσης MySQL από 8.0.22 σε 8.0.29


Αναβάθμιση δευτερεύουσας έκδοσης MySQL από 8.0.22 σε 8.0.29

ΕΝΑ μικρή αναβάθμιση είναι εύκολο να το εκτελέσετε απλά εγκαταστήστε τη νέα έκδοση χρησιμοποιώντας το διαχειριστής πακέτων σαν ναι της διανομής σας. Η εγκατάσταση της νέας έκδοσης ενός πακέτου απαιτεί τη διακοπή της υπηρεσίας MySQL.

Σε ένα πρόσφατο blog, εγκαταστήσαμε τον MySQL Server 8.0.22 χρησιμοποιώντας τη μέθοδο Yum Repository Κάντε κλικ εδώ για να διαβάσετε περισσότερα. Θα χρησιμοποιήσουμε τον ίδιο διακομιστή MySQL για να πραγματοποιήσουμε τη μικρή αναβάθμιση στην έκδοση 8.0.29.

Ακολουθήστε τα παρακάτω βήματα για να εκτελέσετε μια μικρή αναβάθμιση έκδοσης

1. Πάρτε το πλήρες αντίγραφο ασφαλείας του διακομιστή MySQL
2. Ελέγξτε την τρέχουσα έκδοση MySQL
3. Ελέγξτε για την πιο πρόσφατη διαθέσιμη έκδοση
4. Αναγκαστική απόρριψη του buffer pool & ξεπλύνετε τις βρώμικες σελίδες
5. Σταματήστε τον διακομιστή MySQL
6. Εκτελέστε την ενημέρωση yum για ενημέρωση νέων δυαδικών αρχείων
7. Εκκινήστε τον διακομιστή MySQL και ελέγξτε την Έκδοση

Βήμα 1. Πάρτε το πλήρες αντίγραφο ασφαλείας του διακομιστή MySQL: Χρησιμοποιούμε Percona Xtrabackup για να εκτελέσετε ένα πλήρες αντίγραφο ασφαλείας διακομιστή MySQL σε φυσικό επίπεδο. Κάντε κλικ εδώ για να διαβάσετε περισσότερα για Percona Xtrabackup.

[[email protected] mysql_bkp]$ xtrabackup --backup --target-dir=/u01/mysql_bkp/full_bkp/ -uroot -p
xtrabackup: recognized client arguments: --backup=1 --target-dir=/u01/mysql_bkp/full_bkp/ --user=root --password
Enter password:
xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86_64) (revision id: 4aecf82)
211117 11:48:27  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup','root',...) failed: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory at - line 1535.
211117 11:48:27 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
Using server version 8.0.22
211117 11:48:27 Executing LOCK INSTANCE FOR BACKUP...
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
Number of pools: 1
xtrabackup: inititialize_service_handles suceeded
211117 11:48:27 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
xtrabackup: Redo Log Archiving is not set up.
211117 11:48:27 >> log scanned up to (1061140266)
xtrabackup: Generating a list of tablespaces
xtrabackup: Generating a list of tablespaces
Scanning './'
Directory '/var/lib/mysql/.cache' will not be scanned because it is a hidden directory.
Directory '/var/lib/mysql/.config' will not be scanned because it is a hidden directory.
Directory '/var/lib/mysql/.bash_history' will not be scanned because it is a hidden directory.
Directory '/var/lib/mysql/.bash_profile' will not be scanned because it is a hidden directory.
Scanning '/u01/mysql/'
Completed space ID check of 2 files.
Allocated tablespace ID 74 for grouprepl_test/t1, old maximum was 0
Using undo tablespace './undo_001'.
Using undo tablespace './undo_002'.
Opened 2 existing undo tablespaces.
211117 11:48:27 [01] Copying ./ibdata1 to /u01/mysql_bkp/full_bkp/ibdata1
211117 11:48:27 [01]        ...done
211117 11:48:27 [01] Copying ./sys/sys_config.ibd to /u01/mysql_bkp/full_bkp/sys/sys_config.ibd
211117 11:48:27 [01]        ...done
211117 11:48:27 [01] Copying ./grouprepl_test/t1.ibd to /u01/mysql_bkp/full_bkp/grouprepl_test/t1.ibd
211117 11:48:27 [01]        ...done
211117 11:48:27 [01] Copying ./mysql_innodb_cluster_metadata/clusters.ibd to /u01/mysql_bkp/full_bkp/mysql_innodb_cluster_metadata/clusters.ibd
211117 11:48:27 [01]        ...done
 
211117 11:48:28 [01]        ...done
211117 11:48:28 [01] Copying performance_schema/clone_progress_507.sdi to /u01/mysql_bkp/full_bkp/performance_schema/clone_progress_507.sdi
211117 11:48:28 [01]        ...done
211117 11:48:28 [00] Writing /u01/mysql_bkp/full_bkp/test/db.opt
211117 11:48:28 [00]        ...done
211117 11:48:28 Finished backing up non-InnoDB tables and files
211117 11:48:28 Executing FLUSH NO_WRITE_TO_BINLOG BINARY LOGS
211117 11:48:28 Selecting LSN and binary log position from p_s.log_status
211117 11:48:28 [00] Copying /var/lib/mysql/binlog.000019 to /u01/mysql_bkp/full_bkp/binlog.000019 up to position 156
211117 11:48:28 [00]        ...done
211117 11:48:28 [00] Writing /u01/mysql_bkp/full_bkp/binlog.index
211117 11:48:28 [00]        ...done
211117 11:48:28 [00] Writing /u01/mysql_bkp/full_bkp/xtrabackup_binlog_info
211117 11:48:28 [00]        ...done
211117 11:48:28 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '1061140266'
xtrabackup: Stopping log copying thread at LSN 1061140266.
Starting to parse redo log at lsn = 1061140014
211117 11:48:28 Executing UNLOCK INSTANCE
211117 11:48:28 All tables unlocked
211117 11:48:28 [00] Copying ib_buffer_pool to /u01/mysql_bkp/full_bkp/ib_buffer_pool
211117 11:48:28 [00]        ...done
211117 11:48:28 Backup created in directory '/u01/mysql_bkp/full_bkp/'
MySQL binlog position: filename 'binlog.000019', position '156', GTID of the last change '13ecba9c-444a-11eb-a397-000c29f9d9e6:1,4cb6a75d-9ac5-11eb-98d9-000c293ab022:1-4871:1000012-1000187,81646864-9069-11eb-bb04-000c293ab022:1-98'
211117 11:48:28 [00] Writing /u01/mysql_bkp/full_bkp/backup-my.cnf
211117 11:48:28 [00]        ...done
211117 11:48:28 [00] Writing /u01/mysql_bkp/full_bkp/xtrabackup_info
211117 11:48:28 [00]        ...done
xtrabackup: Transaction log of lsn (1061140266) to (1061140276) was copied.
211117 11:48:30 completed OK!
[[email protected] mysql_bkp]$
 
[[email protected] mysql_bkp]$
[[email protected] mysql_bkp]$ cd full_bkp
[[email protected] full_bkp]$ ls -ltr
total 61508
-rw-r-----. 1 mysql mysql 12582912 Nov 17 11:48 ibdata1
drwxr-x---. 2 mysql mysql       28 Nov 17 11:48 sys
drwxr-x---. 2 mysql mysql       20 Nov 17 11:48 grouprepl_test
drwxr-x---. 2 mysql mysql     4096 Nov 17 11:48 mysql_innodb_cluster_metadata
drwxr-x---. 2 mysql mysql     4096 Nov 17 11:48 employees
drwxr-x---. 2 mysql mysql     4096 Nov 17 11:48 repl_test
drwxr-x---. 2 mysql mysql       93 Nov 17 11:48 repl_test1
-rw-r-----. 1 mysql mysql 25165824 Nov 17 11:48 mysql.ibd
-rw-r-----. 1 mysql mysql 12582912 Nov 17 11:48 undo_002
-rw-r-----. 1 mysql mysql 12582912 Nov 17 11:48 undo_001
drwxr-x---. 2 mysql mysql     4096 Nov 17 11:48 mysql
drwxr-x---. 2 mysql mysql     8192 Nov 17 11:48 performance_schema
drwxr-x---. 2 mysql mysql       20 Nov 17 11:48 test
-rw-r-----. 1 mysql mysql      156 Nov 17 11:48 binlog.000019
-rw-r-----. 1 mysql mysql       29 Nov 17 11:48 binlog.index
-rw-r-----. 1 mysql mysql      159 Nov 17 11:48 xtrabackup_binlog_info
-rw-r-----. 1 mysql mysql     2560 Nov 17 11:48 xtrabackup_logfile
-rw-r-----. 1 mysql mysql      108 Nov 17 11:48 xtrabackup_checkpoints
-rw-r-----. 1 mysql mysql     4275 Nov 17 11:48 ib_buffer_pool
-rw-r-----. 1 mysql mysql      475 Nov 17 11:48 backup-my.cnf
-rw-r-----. 1 mysql mysql      138 Nov 17 11:48 xtrabackup_tablespaces
-rw-r-----. 1 mysql mysql      643 Nov 17 11:48 xtrabackup_info
[[email protected] full_bkp]$ 

Βήμα 2. Ελέγξτε την τρέχουσα έκδοση MySQL: Συνδεθείτε στον διακομιστή MySQL και ελέγξτε την τρέχουσα έκδοση. Μπορούμε να χρησιμοποιήσουμε εντολές όπως κατάσταση ή @@εκδοχή για να λάβετε την τρέχουσα έκδοση.

[[email protected] ~]#
[[email protected] ~]# mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 8.0.22 MySQL Community Server - GPL

Copyright (c) 2000, 2020, 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.

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

mysql>
mysql>
mysql> status
--------------
mysql  Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL)

Connection id:          16
Current database:
Current user:           [email protected]
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         8.0.22 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
Binary data as:         Hexadecimal
Uptime:                 46 sec

Threads: 8  Questions: 12  Slow queries: 0  Opens: 120  Flush tables: 3  Open tables: 39  Queries per second avg: 0.260
--------------

mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 8.0.22    |
+-----------+
1 row in set (0.00 sec)

mysql>
mysql>

Βήμα 3. Ελέγξτε για την πιο πρόσφατη διαθέσιμη έκδοση: Για να δείτε μια λίστα με τις ενημερώσεις πακέτων που είναι διαθέσιμες για τη διανομή σας, χρησιμοποιήστε το OS Command yum check-up update. Και yum λίστα Η εντολή θα εμφανίσει τα εγκατεστημένα και διαθέσιμα πακέτα.

[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64 MySQL Connectors Community                 192
mysql-tools-community/x86_64      MySQL Tools Community                       90
mysql80-community/x86_64          MySQL 8.0 Community Server                 343
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#


[[email protected] ~]# yum check-update mysql*
Loaded plugins: langpacks, ulninfo
mysql-connectors-community                                                                                                                                             | 2.6 kB  00:00:00
mysql-tools-community                                                                                                                                                  | 2.6 kB  00:00:00
mysql80-community                                                                                                                                                      | 2.6 kB  00:00:00
mysql-community-client.x86_64                                                                 8.0.29-1.el7                                                          mysql80-community
mysql-community-client-plugins.x86_64                                                         8.0.29-1.el7                                                          mysql80-community
mysql-community-common.x86_64                                                                 8.0.29-1.el7                                                          mysql80-community
mysql-community-libs.x86_64                                                                   8.0.29-1.el7                                                          mysql80-community
mysql-community-libs-compat.x86_64                                                            8.0.29-1.el7                                                          mysql80-community
mysql-community-server.x86_64                                                                 8.0.29-1.el7                                                          mysql80-community
mysql-connector-odbc.x86_64                                                                   8.0.29-1.el7                                                          mysql-connectors-community
mysql-router-community.x86_64                                                                 8.0.29-1.el7                                                          mysql-tools-community
mysql-shell.x86_64                                                                            8.0.29-1.el7                                                          mysql-tools-community
mysql80-community-release.noarch                                                              el7-6                                                                 mysql80-community
[[email protected] ~]#



[[email protected] ~]#
[[email protected] ~]# yum list mysql-community-server*
Loaded plugins: langpacks, ulninfo
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Installed Packages
mysql-community-server.x86_64                                                                    8.0.22-1.el7                                                               @mysql80-community
Available Packages
mysql-community-server.x86_64                                                                    8.0.29-1.el7                                                               mysql80-community
mysql-community-server-debug.x86_64                                                              8.0.29-1.el7                                                               mysql80-community
[[email protected] ~]#
[[email protected] ~]#

Βήμα 4. Αναγκαστική απόρριψη του buffer pool και ξεπλύνετε τις βρώμικες σελίδες: Ξεπλύνετε το buffer pool και βρώμικες σελίδες πριν σταματήσετε τον διακομιστή MySQL.

[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.22 MySQL Community Server - GPL

Copyright (c) 2000, 2020, 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.

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

mysql>
mysql>  show global status like 'Innodb_buffer_pool_dump_status';
+--------------------------------+------------------------------------+
| Variable_name                  | Value                              |
+--------------------------------+------------------------------------+
| Innodb_buffer_pool_dump_status | Dumping of buffer pool not started |
+--------------------------------+------------------------------------+
1 row in set (0.01 sec)

mysql>
mysql>  set global innodb_buffer_pool_dump_at_shutdown=OFF, innodb_buffer_pool_dump_now=ON;
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>  show global status like 'Innodb_buffer_pool_dump_status';
+--------------------------------+--------------------------------------------------+
| Variable_name                  | Value                                            |
+--------------------------------+--------------------------------------------------+
| Innodb_buffer_pool_dump_status | Buffer pool(s) dump completed at 220621 17:28:38 |
+--------------------------------+--------------------------------------------------+
1 row in set (0.00 sec)

mysql>


mysql>
mysql> set global innodb_max_dirty_pages_pct=0;
Query OK, 0 rows affected, 2 warnings (0.00 sec)

mysql>
mysql>  show global status like 'Innodb_buffer%dirty';
+--------------------------------+-------+
| Variable_name                  | Value |
+--------------------------------+-------+
| Innodb_buffer_pool_pages_dirty | 0     |
| Innodb_buffer_pool_bytes_dirty | 0     |
+--------------------------------+-------+
2 rows in set (0.01 sec)

mysql>
mysql>

Βήμα 5. Διακοπή του διακομιστή MySql: Διακόψτε τη χρήση του διακομιστή MySQL systemctl να σταματήσει.

[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# systemctl stop [email protected]
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# systemctl status [email protected]
â [email protected] - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html

Jun 21 15:58:22 test-machine01 systemd[1]: Starting MySQL Server...
Jun 21 15:58:28 test-machine01 systemd[1]: Started MySQL Server.
Jun 21 17:30:51 test-machine01 systemd[1]: Stopping MySQL Server...
Jun 21 17:30:52 test-machine01 systemd[1]: Stopped MySQL Server.
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#

Βήμα 6. Εκτελέστε την εντολή yum update για να ενημερώσετε νέα δυαδικά αρχεία: Χρησιμοποιήστε την εντολή OS yum ενημέρωση για να ενημερώσετε τα υπάρχοντα δυαδικά αρχεία MySQL.

[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# yum update mysql mysql-server
Loaded plugins: langpacks, ulninfo
mysql-connectors-community                                                                                                                                             | 2.6 kB  00:00:00
mysql-tools-community                                                                                                                                                  | 2.6 kB  00:00:00
mysql80-community                                                                                                                                                      | 2.6 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:8.0.22-1.el7 will be updated
---> Package mysql-community-client.x86_64 0:8.0.29-1.el7 will be an update
--> Processing Dependency: mysql-community-client-plugins = 8.0.29-1.el7 for package: mysql-community-client-8.0.29-1.el7.x86_64
---> Package mysql-community-server.x86_64 0:8.0.22-1.el7 will be updated
---> Package mysql-community-server.x86_64 0:8.0.29-1.el7 will be an update
--> Processing Dependency: mysql-community-common(x86-64) = 8.0.29-1.el7 for package: mysql-community-server-8.0.29-1.el7.x86_64
--> Processing Dependency: mysql-community-icu-data-files = 8.0.29-1.el7 for package: mysql-community-server-8.0.29-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client-plugins.x86_64 0:8.0.22-1.el7 will be updated
--> Processing Dependency: mysql-community-client-plugins = 8.0.22-1.el7 for package: mysql-community-libs-8.0.22-1.el7.x86_64
---> Package mysql-community-client-plugins.x86_64 0:8.0.29-1.el7 will be an update
---> Package mysql-community-common.x86_64 0:8.0.22-1.el7 will be updated
---> Package mysql-community-common.x86_64 0:8.0.29-1.el7 will be an update
---> Package mysql-community-icu-data-files.x86_64 0:8.0.29-1.el7 will be installed
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:8.0.22-1.el7 will be updated
---> Package mysql-community-libs.x86_64 0:8.0.29-1.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================
Package                                                    Arch                               Version                                    Repository                                     Size
==============================================================================================================================================================================================
Updating:
mysql-community-client                                     x86_64                             8.0.29-1.el7                               mysql80-community                              14 M
mysql-community-server                                     x86_64                             8.0.29-1.el7                               mysql80-community                              53 M
Installing for dependencies:
mysql-community-icu-data-files                             x86_64                             8.0.29-1.el7                               mysql80-community                             2.1 M
Updating for dependencies:
mysql-community-client-plugins                             x86_64                             8.0.29-1.el7                               mysql80-community                             2.5 M
mysql-community-common                                     x86_64                             8.0.29-1.el7                               mysql80-community                             633 k
mysql-community-libs                                       x86_64                             8.0.29-1.el7                               mysql80-community                             1.5 M
Transaction Summary
==============================================================================================================================================================================================
Install             ( 1 Dependent package)
Upgrade  2 Packages (+3 Dependent packages)
Total download size: 74 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): mysql-community-client-plugins-8.0.29-1.el7.x86_64.rpm                                                                                                          | 2.5 MB  00:00:01
(2/6): mysql-community-common-8.0.29-1.el7.x86_64.rpm                                                                                                                  | 633 kB  00:00:00
(3/6): mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm                                                                                                          | 2.1 MB  00:00:01
(4/6): mysql-community-libs-8.0.29-1.el7.x86_64.rpm                                                                                                                    | 1.5 MB  00:00:00
(5/6): mysql-community-client-8.0.29-1.el7.x86_64.rpm                                                                                                                  |  14 MB  00:00:06
(6/6): mysql-community-server-8.0.29-1.el7.x86_64.rpm                                                                                                                  |  53 MB  00:00:11
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                         4.6 MB/s |  74 MB  00:00:15
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Updating   : mysql-community-common-8.0.29-1.el7.x86_64                                                                                                                                1/11
Updating   : mysql-community-client-plugins-8.0.29-1.el7.x86_64                                                                                                                        2/11
Updating   : mysql-community-libs-8.0.29-1.el7.x86_64                                                                                                                                  3/11
Updating   : mysql-community-client-8.0.29-1.el7.x86_64                                                                                                                                4/11
Installing : mysql-community-icu-data-files-8.0.29-1.el7.x86_64                                                                                                                        5/11
Updating   : mysql-community-server-8.0.29-1.el7.x86_64                                                                                                                                6/11
Cleanup    : mysql-community-server-8.0.22-1.el7.x86_64                                                                                                                                7/11
Cleanup    : mysql-community-client-8.0.22-1.el7.x86_64                                                                                                                                8/11
Cleanup    : mysql-community-libs-8.0.22-1.el7.x86_64                                                                                                                                  9/11
Cleanup    : mysql-community-common-8.0.22-1.el7.x86_64                                                                                                                               10/11
Cleanup    : mysql-community-client-plugins-8.0.22-1.el7.x86_64                                                                                                                       11/11
Verifying  : mysql-community-icu-data-files-8.0.29-1.el7.x86_64                                                                                                                        1/11
Verifying  : mysql-community-client-8.0.29-1.el7.x86_64                                                                                                                                2/11
Verifying  : mysql-community-client-plugins-8.0.29-1.el7.x86_64                                                                                                                        3/11
Verifying  : mysql-community-server-8.0.29-1.el7.x86_64                                                                                                                                4/11
Verifying  : mysql-community-common-8.0.29-1.el7.x86_64                                                                                                                                5/11
Verifying  : mysql-community-libs-8.0.29-1.el7.x86_64                                                                                                                                  6/11
Verifying  : mysql-community-libs-8.0.22-1.el7.x86_64                                                                                                                                  7/11
Verifying  : mysql-community-server-8.0.22-1.el7.x86_64                                                                                                                                8/11
Verifying  : mysql-community-client-plugins-8.0.22-1.el7.x86_64                                                                                                                        9/11
Verifying  : mysql-community-common-8.0.22-1.el7.x86_64                                                                                                                               10/11
Verifying  : mysql-community-client-8.0.22-1.el7.x86_64                                                                                                                               11/11
Dependency Installed:
mysql-community-icu-data-files.x86_64 0:8.0.29-1.el7
Updated:
mysql-community-client.x86_64 0:8.0.29-1.el7                                                  mysql-community-server.x86_64 0:8.0.29-1.el7
Dependency Updated:
mysql-community-client-plugins.x86_64 0:8.0.29-1.el7                 mysql-community-common.x86_64 0:8.0.29-1.el7                 mysql-community-libs.x86_64 0:8.0.29-1.el7
Complete!
[[email protected] yum.repos.d]#

Βήμα 7. Εκκινήστε τον διακομιστή MySQL και ελέγξτε την Έκδοση: Ξεκινήστε τον διακομιστή MySql χρησιμοποιώντας την εντολή systemctl εκκίνηση και ελέγξτε την έκδοση. Θα παρατηρήσετε ότι η αναβαθμισμένη έκδοση από 8.0.22 σε 8.0.29. Επίσης, σημειώστε ότι η επιλογή mysql_upgrade έχει καταργηθεί. Η διαδικασία αναβάθμισης ξεκινά αυτόματα με την εκτέλεση ενός νέου δυαδικού MySQL με έναν παλαιότερο κατάλογο δεδομένων.

[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# systemctl start [email protected]
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# systemctl status [email protected]
â [email protected] - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-22 10:05:35 +03; 6s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 67215 ExecStartPre=/usr/bin/mysqld_pre_systemd %I (code=exited, status=0/SUCCESS)
Main PID: 67239 (mysqld)
Status: "Server is operational"
CGroup: /system.slice/system-mysqld.slice/[email protected]
ââ67239 /usr/sbin/mysqld [email protected]
Jun 22 10:05:28 test-machine01 systemd[1]: Starting MySQL Server...
Jun 22 10:05:35 test-machine01 systemd[1]: Started MySQL Server.
[[email protected] yum.repos.d]# 
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# mysql_upgrade -hlocalhost -uroot -p
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#  mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.29 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select @@version
-> ;
+-----------+
| @@version |
+-----------+
| 8.0.29    |
+-----------+
1 row in set (0.00 sec)
mysql> 
mysql>
mysql> status
--------------
mysql  Ver 8.0.29 for Linux on x86_64 (MySQL Community Server - GPL)
Connection id:          23
Current database:
Current user:           [email protected]
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         8.0.29 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
Binary data as:         Hexadecimal
Uptime:                 12 min 19 sec
Threads: 2  Questions: 18  Slow queries: 0  Opens: 532  Flush tables: 4  Open tables: 42  Queries per second avg: 0.024
--------------
mysql>
[[email protected] mysql]#
[[email protected] mysql]# pwd
/var/lib/mysql
[[email protected] mysql]# vi mysqld.log
2022-06-22T07:05:29.107089Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-06-22T07:05:29.107112Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2022-06-22T07:05:29.107119Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2022-06-22T07:05:29.107137Z 0 [Warning] [MY-011068] [Server] The syntax 'log_slave_updates' is deprecated and will be removed in a future release. Please use log_replica_updates instead.
2022-06-22T07:05:29.108516Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 67239
2022-06-22T07:05:29.114623Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-06-22T07:05:30.720597Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-06-22T07:05:31.461835Z 0 [System] [MY-013587] [Repl] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2022-06-22T07:05:31.462293Z 0 [Warning] [MY-010918] [Repl] 'rpl_semi_sync_master' is deprecated and will be removed in a future release. Please use rpl_semi_sync_source instead.
2022-06-22T07:05:31.462325Z 0 [Warning] [MY-010918] [Repl] 'rpl_semi_sync_slave' is deprecated and will be removed in a future release. Please use rpl_semi_sync_replica instead.
2022-06-22T07:05:31.484335Z 5 [System] [MY-013381] [Server] Server upgrade from '80022' to '80029' started.
2022-06-22T07:05:35.217346Z 5 [System] [MY-013381] [Server] Server upgrade from '80022' to '80029' completed.
2022-06-22T07:05:35.304303Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-06-22T07:05:35.304345Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
[[email protected] mysql]#

Αυτό το έγγραφο είναι μόνο για μαθητικούς σκοπούς και επικυρώνεται πάντα στο περιβάλλον LAB πρώτα πριν από την εφαρμογή στο περιβάλλον LIVE.


Ελπίζω να σας αρέσει αυτό το άρθρο!
Μοιραστείτε τα πολύτιμα σχόλια/σχόλιά σας/εγγραφείτε και ακολουθήστε μας παρακάτω και μην ξεχάσετε να κάνετε κλικ στο εικονίδιο του κουδουνιού για να λάβετε την πιο πρόσφατη ενημέρωση.
Κάντε κλικ εδώ για να κατανοήσετε περισσότερα για την επιδίωξή μας.

Σχετικά Άρθρα

53 Συνολικές προβολές, 2 Προβολές Σήμερα

παρόμοιες αναρτήσεις

Schreibe einen Kommentar