1. Download mysql5.7.13-windows version
(1) Mysql5.7.13-win64 version Baidu cloud download link share address: Link: http://pan.baidu.com/s/1slMl4Ah Password: w60l
(2) Mysql5.7.13-win32 version Baidu cloud download link share address: Link: Http://pan.baidu.com/s/1c2kcwFI Password: qk3n
2. Unzip the downloaded MySQL file to the specified path on your computer
Here I unzip the path as if:
Figure one: My mysql download file decompression path
3. Configure the MySQL environment variable
(1 ) Right-click Environment variables, properties---Advanced system settings (Advanced), My Computer
Click the New button under System variables
Input variable name: mysql_home
Input variable Value: F:\mysql
#即为mysql的自定义解压目录, as shown in two:
Figure Two: Configuring environment variables for MySQL
(2) Select path in the system variable
Click the Edit button
To add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and the original variable value cannot be deleted. Specific as shown in three (PS: I am currently the computer is WIN10 system, directly fill%mysql_home%\bin can)
Figure three: MySQL environment variable configuration
4. Add a My.ini file to the extracted MySQL file
under the F:\mysql path, create a new txt text, then modify the extension and name it My.ini to put the following code in the file:
################### #配置文件开始 ################### # for advice on how toChange settings# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html# * * * Don't EDIT this FILE. It's a template which 'll be copied to the# ***defaultLocation during install, andwould be replacedif You# * * * Upgrade toA newer version ofMySQL. [Client]default-character-set=utf8 [mysqld] port=3306Basedir =" F:\mysql/"DataDir =" F:\mysql/data/"Tmpdir =" F:\mysql/data/"socket =" F:\mysql/data/mysql.sock"log-error=" F:\mysql/data/mysql_error.log"#server_id =2#skip-locking max_connections= -table_open_cache= thequery_cache_size=1m tmp_table_size=32m thread_cache_size=8innodb_data_home_dir=" F:\mysql/data/"Innodb_flush_log_at_trx_commit =1innodb_log_buffer_size=128m innodb_buffer_pool_size=128m innodb_log_file_size=10m innodb_thread_concurrency= -innodb-autoextend-increment= +join_buffer_size = 128M Sort_buffer_size = 32M Read_rnd_buffer_size = 32M Max_allowed_packet = 32M explicit_defaults_ for_timestamp=truesql-mode="strict_trans_tables,no_auto_create_user,no_engine_substitution"#Sql_mode=no_engine_substitution,strict_trans_tables################### #配置文件结束 ###################
where the address of the path is filled in the actual storage address of the extracted MySQL file
5. Install MySQL service and log in to MySQL
First, open cmd as an administrator, followed by the following steps:
(1) Use command: mysqld--initialize-insecure, this command will generate the root user without password. The command mysqld--initialize automatically generates a root user with a random password. Here, the first command is used to generate a root user without a password.
>mysqld--initialize-insecure (PS: Because there is no data folder in the extracted MySQL folder, this command will automatically generate the data folder here; It is recommended to use mysqld here-- Initialize-insecure command)
(2) Immediately after, use command: mysqld--install, install MySQL service (ps:mysql Remove to uninstall MySQL service)
(3) Start MySQL service using command: net start MySQL, turn on MySQL service
(4) Use the command: first enter the Mysql-u root-p,enter key into MySQL, enter again (note that there is no need to enter a password)
Introduction to Mysql5.7.13-windows Installation-free version configuration