Install mysql5.7 version Zip installation

Source: Internet
Author: User
Tags uuid

Unzip
Unzip the downloaded file to your favorite location, such as my own location is D:\Program files\mysql-5.7.10-winx64
Adding environment variables
Environment variables, advanced system settings, properties----right--computer, Property--Add the MYSQL_HOME environment variable to the system variable, the value of the variable is the root directory of MySQL, for example my is D:\Program files\ Mysql-5.7.10-winx64 (the original path is wrong, has changed, to the misleading netizen expressed sorry.) Thank you for your "huge" reminder, 2016.5.7)
Locate path, select Edit, add at the end of the original value;%mysql_home%\bin
Add a configuration file
In the MySQL installation directory (for example, my is D:\mysql\mysql-5.7.17-winx64), create a new text file txt, and name it My.ini can also be set directly in My-default (note that the extension is also to be modified).
Double-click to open the file and add the following to it:
[Mysqld]
Basedir=d:\mysql\mysql-5.7.17-winx64
Datadir=d:\mysql\mysql-5.7.17-winx64\data
Port = 3306
Close after saving
Initializing the database
Open cmd as an administrator to execute the following commands (note that you must open as an administrator or report an error)
Mysqld--initialize--user=mysql--console
A randomly generated initial password appears at the end of the console message (because there are special characters, it's easy to remember, it's best to keep the whole message in Notepad)
If the above command is not successful, use the following command instead:
%mysql_home%\bin\mysqld--initialize--user=mysql--console
If you still don't succeed, check the 2nd step
Add MySQL to the system service
Open cmd as an administrator to execute the following commands (note that you must open as an administrator or report an error)
Mysqld--install MySQL
net start MySQL
The installation succeeds, and the "service started successfully" is displayed
If the above command does not run successfully, you can use the following command instead:
%mysql_home%\bin\mysqld--install MYSQL
net start MySQL
(After the 2nd step has been changed, this has forgotten the change, thank you Netizen mu Nova reminder, 2016.6.12)
The installation succeeds, and the "service started successfully" is displayed
If you still don't succeed, check the 2nd step
Start MySQL and change the password
Execute commands in the cmd console mysql-u root-p
Enter the random password that you just recorded after you execute the carriage return
After successful execution, the console displays Mysql>
Input command set password for [email protected] = password (' root '); (Note semicolon)
At this point, the root user's password is modified to root (reproduced above) the request MySQL path is entered in the Bin directory after obtaining the following

D:\mysql\mysql-5.7.17-winx64\bin>mysqld--initialize--user=mysql--console
2016-12-27t12:44:13.427396z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
Deprecated. --explicit_defaults_for_timestamp server Option (see doc
Umentation for more details).
2016-12-27t12:44:15.407509z 0 [Warning] innodb:new log files created, lsn=45790

2016-12-27t12:44:16.236556z 0 [Warning] innodb:creating FOREIGN KEY constraint
system tables.
2016-12-27t12:44:16.449568z 0 [Warning] No existing UUID have been found, so we a
Ssume that's the first time that this server has been started. Generating
A new uuid:2d759afb-cc32-11e6-a85a-80fa5b098b5e.
2016-12-27t12:44:16.515572z 0 [Warning] Gtid table is not a ready-to-be used. Tabl
E ' mysql.gtid_executed ' cannot be opened.
2016-12-27t12:44:16.549574z 1 [Note] A temporary password is generated for [email protected]
Localhost:zvo6ga,vu1bb

The bottom zvo6ga,vu1bb is the password

1 [note][email protected] generates a temporary password localhost:zvo6ga VU1BB

It is important to note that the My.ini file you are writing needs to be a configuration file

Directly copy the contents of the My-default;

Follow the steps on OK

Install mysql5.7 version Zip installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.