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
Table of contents 01 Problem Description 02 Solut...
1. Download 4 rpm packages mysql-community-client...
[LeetCode] 184. Department Highest Salary The Emp...
Table of contents 1. Core commands 2. Common comm...
The encapsulation and use of Vue's control pr...
The table structure is as follows: id varchar(32)...
1. Introduction Recently I found that there are m...
Start a new project This article mainly records t...
filter is generally used to filter certain values...
1. Create a database: create data data _name; Two...
There are four main MySQL string interception fun...
Scenario The company project is deployed in Docke...
1. Create a page using app.json According to our ...
Table of contents 1. Event delegation Event Bubbl...
Here are 10 HTML tags that are underused or misun...