Record: Win10 installation, the most important thing is to modify the registry, or error: A system error 2 occurred. The system cannot find the file specified
The decompression version does not specify the directory as installed, so you need to change the registry:
Hkey_local_machine-system-currentcontrolset-services-mysql (service name)-imagepath
Change to: "C:\Program files\mysql\bin\mysqld"--defaults-file= "C:\Program Files\mysql\my.ini" MySQL
As shown in the following:
1. Create My.ini
##################################################
[MySQL]
#设置客户端字符集
Default-character-set=utf8
[Mysqld]
port=3306
#设置字符集为utf8
Character_set_server=utf8
Basedir=g:\mysql-5.7.15-winx64
# Storage directory for databases
Datadir=g:\mysql-5.7.15-winx64\data
#最大连接数
max_connections=200
Sql_mode=no_engine_substitution,strict_trans_tables
#默认存储引擎
Default-storage-engine=innodb
##################################################
2. Execute under Bin (or add environment variable mysql_home and add%mysql_home% in path) to open cmd
Execution: Mysqld-install
After successful execution start MySQL
net start MySQL
Then execute mysql-uroot-p
Install MySQL decompression version