一、描述
漏掃發現MySQL有低風險漏洞,自己寫方案、自己做測試、自己更新。
版本:MySQL 5.7.25 更新到MySQL 5.7.28最新版本。
架構:主從架構
二、更新流程
1、下載下傳最新版資料庫軟體MySQL 5.7.28
2、上傳到指定目錄
3、備份資料庫軟體、資料庫資料目錄、my.cnf
4、解壓縮資料庫軟體到指定路徑
5、關閉備庫
6、使用新版軟體啟動備庫,mysqld_safe &
7、登入備庫,發現版本已更新,使用mysql_upgrade指令更新系統資料庫
8、無報錯的話,重新開機備庫。
9、主庫按照備庫流程走一遍
10、最後确認主備庫是否一緻
三、部分内容
# 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: [email protected]
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
MySQL 5.7.25主備架構小版本In-Place更新思路
标簽:let exe 資料庫軟體 mmu 更新 password ansi har sla
本條技術文章來源于網際網路,如果無意侵犯您的權益請點選此處回報版權投訴
本文系統來源:https://blog.51cto.com/roidba/2450446