Because Django perform the migration table to generate an error had upgraded version
1, download the official mysql5.7.27 zip file, official address: https: //dev.mysql.com/downloads/windows/installer/5.7.html
2, extract, add environment variables to extract the position
3, uninstall the original database
(Note that the original date put back out)
Remove the registry
Use CCleanerProPlus perfect easily remove
Delete Service
Command sc delete mysql, mysql delete the reference address https://blog.csdn.net/qq_39701269/article/details/77935490
4, installation
1. Create a file called "my.ini" in the root directory of MySQL, this document is MySQL configuration file
[mysql]
# 设置mysql客户端默认字符集
default
-character-
set
=utf8
[mysqld]
# 设置mysql的安装目录
basedir = D:\Mysql5.29\mysql-5.7.29-winx64
# 设置mysql数据库的数据的存放目录
datadir = D:\Mysql5.29\mysql-5.7.29-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-
set
-server=utf8
# 创建新表时将使用的默认存储引擎
default
-storage-engine=INNODB
# 如果需要的存储引擎被禁用或未编译,可以防止自动替换存储引擎
# 为事务存储引擎启用严格模式,也可能为非事务存储引擎启用严格模式
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# 开启查询缓存
explicit_defaults_for_timestamp=
true
mysqld install MySQL --defaults-file=
"D:\Mysql5.29\mysql-5.7.29-winx64
\my-default.ini"
mysqld --initialize --user=mysql --console #初始化 获取root随机密码 “root
@localhost
”后的随机字符串就是root的临时密码。
set password = password ( 'password');
Reference https://www.cnblogs.com/super-wking/p/10551936.html
5, restore the original data
Copy the data folder over the original date
Replace the log table space
So far mysql upgrade is complete! ! !