Upgrade ideas of in place for MySQL 5.7.25
Keywords:
MySQL
Database
Unix
socket
I. description
It is found that MySQL has a low-risk vulnerability. You can write your own scheme, test yourself, and upgrade yourself.
Version: upgrade MySQL 5.7.25 to the latest version of MySQL 5.7.28.
Architecture: master-slave architecture
II. Upgrading process
1. Download the latest database software MySQL 5.7.28
2. Upload to the specified directory
3. Backup database software, database data directory, my.cnf
4. Decompress the database software to the specified path
5. Close the standby Library
6. Use the new software to start the standby database, mysqld_safe&
7. Log in to the standby database and find that the version has been upgraded. Use MySQL? Upgrade command to upgrade the system database
8. If no error is reported, restart the standby database.
9. The main warehouse goes through the standby warehouse process
10. Finally, confirm whether the active and standby databases are consistent
III. some contents
# mysql_upgrade -uroot -p
mysql_upgrade: [Warning] Using a password on the command line interface can be insecure.
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.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
Found outdated sys schema version 1.5.1.
Upgrading the sys schema.
Checking databases.
sys.sys_config OK
Upgrade process completed successfully.
Checking if update is needed.
mysql> status
--------------
mysql Ver 14.14 Distrib 5.7.28, for linux-glibc2.12 (x86_64) using EditLine wrapper
Connection id: 2
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.28-log 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: /tmp/mysql.sock
Uptime: 27 sec
Posted by adityakonda on Thu, 14 Nov 2019 06:02:08 -0800