In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The upgrade method of this article is physical upgrade:
Directly replace the installation directory of mysql and modify my.cnf, and use mysql_upgrade to upgrade the system table. this method needs to back up the original files, which belongs to physical copy and is fast. On the downside, cross-version upgrades are not recommended, such as mysql5.1 to mysql5.6,mysql5.5 to mysql5.7 and so on.
Mysql5.7.23 download address: https://cdn.mysql.com//Downloads. C2.12-x86_64.tar.gz
Preparation:
Disable some services or processes related to mysql (zabbix, agent, php, etc.).
PS: remember to check if there are any errors in the table in the database mysql. If there is any error, you should deal with it first. If you need to back up the data, you need to backup it first.
1. Mysql file backup
# mysql-u root-pp@ssw0rd-- execute= "SET GLOBAL innodb_fast_shutdown=0"
# mysqldump-u root-pp@ssw0rd zabbix > / tmp/zabbix.sql
# mysqladmin-uroot-pp@ssw0rd shutdown
# mv / usr/local/mysql / usr/local/mysql_bak
2. Download mysql-5.7.23-linux-glibc2.12-x86_64.tar and put it on zabbix for decompression.
# tar-zxvf mysql-5.7.23-linux-glibc2.12-x86_64.tar
# mv mysql-5.7.23-linux-glibc2.12-x86_64 / usr/local/mysql (decompressed to the original mysql path)
# chown-R mysql:mysql / usr/local/mysql (change the user group)
3. Modify my.cnf file
Comment out 2 parameters (no longer supported by mysql5.7):
Innodb_additional_mem_pool_size=8M
Thread_concurrency=64
4. Enable mysql
# / usr/local/mysql/bin/mysqld_safe-defaults-file=/etc/my.cnf-socket=/usr/local/mysql/mysql.sock &
Tips: an error may occur here. You need to check the database log error.log to locate the problem. Generally, you need to comment out a parameter.
# ps-ef | grep mysql
Seeing the process of mysql5.7 appears, it means that it is started.
5. Database upgrade
# / usr/local/mysql/bin/mysql_upgrade-u root-pp@ssw0rd-- socket=/usr/local/mysql/mysql.sock
When you see the last appearance: Upgrade process completed successfully.
Checking if update is needed.
It can indicate that the upgrade table is complete.
6. Check the database
Check to see if the upgraded database version is 5.7.23 and if there is any error in error.log.
Restart the database
# service mysql stop
# service mysql start
Check to see if the database starts to report an error.
# vim / data/mysql/log/error.log
View database version
# mysql-V
# mysql-u root-pp@ssw0rd-- execute= "select version ()"
# mysql-u root-pp@ssw0rd-- execute= "\ s"
See that the Server Version is 5.7.23, indicating that the upgrade is officially completed.
Original address
Mysql5.6 upgrade to 5.7 (physical)
Http://www.lwops.cn/forum.php?mod=viewthread&tid=63
(source: Lewei _ one-stop operation and maintenance monitoring and management platform)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.