Introduced
1. Download decompression
Download Address: Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-winx64.zip
Rename the downloaded MySQL extract to C:\Program files\mysql\mysql Server 5.7 "
2. Create a table of contents
To create a data file and log file storage directory: D:\mysql\data;d:\mysql\log
3. Create My.ini
Create the My.ini file (note the hidden file suffix name) in the C-packing directory, as follows (list only the required configurations for installation):
[Client]
No-beep
socket =0.0
port=3306
[mysqld]
server-id=45
port=3306 character-set-server= UTF8MB4
pid-file = "Mysql.pid"
socket =0.0
basedir= "C:\Program files\mysql\mysql Server 5.7"
Datadir= "D:/mysql/data"
tmpdir= "D:/mysql/data"
default-storage-engine=innodb
#####============= =============================================================[log]============================================= ===================================
slow-query-log=1
long_query_time=1
slow_query_log_file= "D:/ Mysql/log/mysql-slow.log "
# #log-bin=" D:/mysql/log/mysql-bin "
log-error=" D:/mysql/log/mysql-error.log "
4. Initialization installation
Go to the CMD command interface and switch to "CD C:\Program files\mysql\mysql Server 5.7\bin"
Copy Code code as follows:
Mysqld--defaults-file=c:\my.ini--initialize--innodb_undo_tablespaces=3--explicit_defaults_for_timestamp
5. Configure Environment variables
Adding in environment variables
C:\Program files\mysql\mysql Server 5.7\bin
6. Add MySQL Service
Increase Service mysqld Install MySQL--defaults-file= "C:\my.ini"
Removal service mysqld remove
Note: the "MySQL" here is the service name set
7. Start off MySQL
Startup net start MySQL
Turn off net stop MySQL
8. Log into MySQL
1. If the installation is using-initialize-insecure, a root user password will be generated during installation
2. If installed using the--initialize method, a root user password will be generated in the error log file when Mysql-u root-p is logged in (I am here to take the second installation method)
9. Modify User Password
SET Password=password (');
Or
ALTER USER ' root ' @ ' localhost ' identified by ' new_password ';
Reference: http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
Summarize
the whole installation process is still relatively simple!!!
Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.