Written in front There are two ways to upgrade MySQL: in-place upgrade and logical upgrade. There is no essential difference between these two upgrade methods. There are just some differences in the processing of data files. In-place upgrades directly copy data files, while logical upgrades process data files through logical export and import, which requires the use of mysqldump. As we all know, logical upgrades take a long time when the amount of data is large. So today we are going to talk about upgrading in place. In-place upgrade 1. Close the existing MySQL. Use the cmd window to enter the mysql directory and remove the mysql service. X:\Ares\bin\mysql5.6\bin>mysqld --remove mysql5.6 Service successfully removed. 2. Download the latest mysql5.7 compressed package. Download address: https://dev.mysql.com/downloads/mysql/ When you unzip the latest MySQL 5.7 compressed package, you will find that there is no data directory and my.ini file, which is different from the previous version. 3. Copy the data directory and my.ini file of mysql5.6 to mysql5.7. Please note that some of the configurations in version 5.6 of my.ini are no longer available in version 5.7. Make the following changes to the mysql.ini file configuration. [mysqld] # Set the installation directory of mysql [modify according to local conditions] basedir = X:/Ares/bin/mysql # Set the storage directory for mysql database data [modify according to local conditions] datadir = X:/Ares/bin/mysql/data #Set port 3306 port = 3306 # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] # Set the default character set of the mysql client to default-character-set=utf8 4. Add the mysql5.7 service to the win service queue and start the mysql service. Add the mysql5.7 service to the win service queue X:\Ares\bin\mysql5.7\bin>mysqld --install mysql5.7 Service successfully removed. Start mysql service X:\Ares\bin\mysql5.7\bin>net start mysql5.7 mysql5.7 service is starting.. The mysql5.7 service has been started successfully. 5. Upgrade mysql: mysql_upgrade -uroot -p X:\Ares\bin\mysql5.7\bin>mysql_upgrade -uroot -p123 .......Omit 10,000 words............. The upgrade speed depends on the size of the data directory. 6. After the upgrade is successful, restart the mysql5.7 service again X:\Ares\bin\mysql5.7\bin>net stop mysql5.7 The mysql service is stopping. The mysql service has been stopped successfully. X:\Ares\bin\mysql5.7\bin>net start mysql5.7 mysql5.7 service is starting.. The mysql5.7 service has been started successfully. 7. The installation and upgrade are complete. The above is the method I introduced to you to upgrade Mysql5.6 to 5.7 under Win. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Avoid abusing this to read data in data in Vue
>>: Teach you a trick to achieve text comparison in Linux
Problem 1: Baidu Map uses tiled images (the map i...
One environment Install VMware Tools on CentOS 7 ...
Writing method 1: update sas_order_supply_month_p...
Recently, I have a need to list all host names in...
Table of contents 1. Define object methods 2. Def...
Problem Description Recently, a host reported the...
1.MySQL UPDATE JOIN syntax In MySQL, you can use ...
** Detailed graphic instructions for installing y...
Table of contents process Demo Mini Program Backe...
Table of contents Why do we need Docker? Docker d...
environment: MAC_OS 10.12 Python 3.6 mysql 5.7.25...
Steps to configure whitelist access in mysql 1. L...
1. Overview I searched a lot online and found tha...
This article shares the specific code of uni-app ...
Table of contents 1. Use closures 2. Use ES6 clas...