Copyright NOTICE: This article for the collection of articles from all kinds of original articles, reproduced please indicate the source: http://www.cnblogs.com/2186009311CFF/p/6517470.html.
1. Download MySQL Community Server: https://dev.mysql.com/downloads/mysql/
2. Unzip to the directory you want to install: (I am using this method to not install directly on the C drive) here assume that the decompression to D:\AZ\MYSQL
3. One, run the command prompt as administrator, to D:\AZ\MYSQL\mysql-5.7.17-winx64\bin
The command is: cd/d D:\AZ\MYSQL\mysql-5.7.17-winx64\bin
Second, install MySQL:
The command is: mysqld install
Third, start the MySQL service:
The command is: net start MySQL. (Command installed MySQL under Windows system default service name is MySQL, default password is empty: press ENTER directly)
IV. Configuring Environment variables: Edit the path system variable and add%mysql_home%\bin to the PATH variable.
Path:d:\az\mysql\mysql-5.7.17-winx64%mysql_home%\bin
V. Enter MySQL:
The command is: Mysql-u root-p. Password defaults to null: press ENTER directly.
Error: MySQL service is starting. The MySQL service could not be started.
The service did not report any errors. Please type NET helpmsg 3534 for more help.
Reference: Http://jingyan.baidu.com/article/cd4c2979033a17756f6e6047.html Step 2 (This method does not succeed, you need to continue the following steps)
4. Troubleshooting:
first, in the D:\AZ\MYSQL\mysql-5.7.17-winx64 directory to extract files, find My-defualt.ini, in My-defualt.ini next to add a My.ini file, the file content is as follows:
(Change the content inside the D:\mysql\mysql-5.7.14-winx64 to your own software path, save)
[mysql]# set MySQL client default character set default - Character-set =utf8 [Mysqld]skip -grant-< Span style= "COLOR: #000000" >tables# set 3306 port = 3306 # Set the installation directory for MySQL basedir =d:\mysql\mysql-5.7 . 14 -winx64# set the data storage directory for the MySQL database datadir =d:\mysql\mysql-5.7 . 14 -winx64\data# allow maximum number of connections max_connections = 200 # server defaults to a 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
Second, restart MySQL after saving
Third, then run CMD as Administrator
The command is: cd/d D:\AZ\MYSQL\mysql-5.7.17-winx64\bin
The command is: Mysql-u root-p
appear password, direct enter can enter
Four, set the password:
1. Go to MySQL database: use MySQL;
2. Set a new password for the root user: Update mysql.user set Authentication_string=password (' 123456 ') where user= ' root ' and host= ' localhost ';
3. Refresh the database: Flush privileges;
4. Exit Mysql:quitbye
Note: 123456 is the new password, users can change their own password according to their own needs
Five, modify My.ini This file, remove the mysqld below the "Skip-grant-tables", Save the exit, and then restart the MySQL service can be.
The contents of the My.ini after the change are:
[mysql]# set MySQL client default character set default-character-set =3306 # Set the installation directory for MYSQL Basedir=d:\az\mysql\mysql- 5.7. -winx64# Set the data storage directory for the MYSQL database datadir=d:\az\mysql\mysql-5.7. -winx64\data# Maximum number of connections allowed max_connections=# 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 -storage-engine=innodb
Reference: Http://www.jb51.net/article/91778.htm and http://jingyan.baidu.com/article/3ea51489e6cfbe52e61bba25.html and http:/ /bbs.csdn.net/topics/391858135
Only I Baidu test finishing income, hope can help you! There are questions please leave a message, Baidu error code to find solutions.
WIN10 64-bit installation of MySQL (mysql-5.7.17-winx64)