MySQL has two upgrade methods: in-place upgrade and logical upgrade. There is essentially no difference between these two upgrade methods. This article will give you a detailed introduction to the method of upgrading Mysql5.6 to 5.7 under Win. Friends who need it can refer to it
Written in front
MySQL upgrade methods are divided into two types: in-place upgrade and logical upgrade. There is essentially no difference between these two upgrade methods. They only have some differences in the processing of data files. The data file is copied directly, and the logical upgrade method of processing the data file is through logical export and import, which requires the use of mysqldump
Everyone understands that this method is less effective in data volume comparison. It takes a long time in large cases, so today we will talk about in-place upgrade
1. Close the existing mysql. cmd window, go to the mysql directory and remove the mysql service
#
X:\Ares\bin\mysql5.6\bin>mysqld --remove mysql5.6 Service successfully removed.
. When you unzip the mysql5.7 compressed package, you will find that there is no data directory and my.ini file, which is different from the previous version
#3. Replace the previous version. Copy the data directory and my.ini file of mysql5.6 to mysql5.7.
Note here: some configurations of version 5.6 in my.ini are no longer available under version 5.7.
Make the following modifications to the mysql.ini file configuration.[mysqld] # 设置mysql的安装目录[根据本地情况进行修改] basedir = X:/Ares/bin/mysql # 设置mysql数据库的数据的存放目录[根据本地情况进行修改] datadir = X:/Ares/bin/mysql/data #设置3306端口 port = 3306 # 允许最大连接数 max_connections=200 # 服务端使用的字符集默认为8比特编码的latin1字符集 character-set-server=utf8 # 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] # 设置mysql客户端默认字符集 default-character-set=utf8
queue
, and start the mysql service. Add the mysql5.7 service to the win service queueX:\Ares\bin\mysql5.7\bin>mysqld --install mysql5.7 Service successfully removed.
X:\Ares\bin\mysql5.7\bin>net start mysql5.7 mysql5.7 服务正在启动 .. mysql5.7 服务已经启动成功。
X:\Ares\bin\mysql5.7\bin>mysql_upgrade -uroot -p123 .......省略一万字..........
X:\Ares\bin\mysql5.7\bin>net stop mysql5.7 mysql 服务正在停止. mysql 服务已成功停止。 X:\Ares\bin\mysql5.7\bin>net start mysql5.7 mysql5.7 服务正在启动 .. mysql5.7 服务已经启动成功。
.
The above is the detailed content of Share how to upgrade Mysql5.6 to 5.7 under Win. For more information, please follow other related articles on the PHP Chinese website!