1. Download http://dev.mysql.com/downloads/mysql/
2. Community > MySQL Community Server
3. Other Downloads: > Windows (x86, 32-bit), ZIP Archive
5, decompression Mysql-5.7.11-winx64.zip, decompression in D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64
6, in the D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64 directory to create a new My.ini file, the setup code is as follows:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
#log-error=d:\mysql\mysql_log_err.txt
#log =d:\mysql\mysql_log.txt
#log-bin=d:/log/mysql/mysql_log_bin
#log-slow-queries= D:\mysql\mysql_log_slow.txt
7. Install MySQL service, execute cmd as Administrator,
C:\windows\system32>d:
D:\>CD D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin
D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin>mysqld Install (uninstall with Mysqld-remove)
Service successfully installed.
D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin>
8. Start the service net start MySQL on the local computer after the service starts to stop. Some services stop automatically when they are not being used by other services or programs.
Switch to the old version of MySQL D:\soft\mysql_5.6.24_winx64\mysql-5.6.24-winx64
Start, prompt: Windows cannot start the MySQL service (located on the local computer). Error 1067: Process terminated unexpectedly
Windows Management > Time Viewer > Automatic View > Summary Page event prompt:
Can ' t find messagefile ' d:\ oft\mysql_5.6.24_winx64\mysql-5.6.24-winx64\share\errmsg.sys '
For more information, see Help and Support Center at http://www.mysql.com.
D:\soft\ is identified as D:\ oft\
Modify the MySQL file storage location D:\mysql
To set the configuration file My.ini file:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
#log-error=d:\mysql\mysql_log_err.txt
#log =d:\mysql\mysql_log.txt
#log-bin=d:/log/mysql/mysql_log_bin
#log-slow-queries= D:\mysql\mysql_log_slow.txt
and copy the D:\mysql\my.ini file to C:\Windows below, start MySQL successfully
9, set the environment variable: D:\mysql\bin;
10, set the password, the new installation root is no password, mysql-u root into MySQL, execute the statement: Set password = password (' 123456 ');
C:\users\alex>mysql-u Root
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server version:5.6.24 MySQL Community Server (GPL)
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> Set Password = password (' 123456 ');
Query OK, 0 rows affected (0.02 sec)
Mysql>
Install, configure, and start MySQL under Win10