First, installation Preparation
mysql-5.6.37-winx64 Download
Second, install MySQL
1. Unzip Mysql-5.7.11-win32.zip to C:\mysql-5.7.11-win32
2. Set the environment variable Mysql_home=c:\mysql-5.7.11-win32, Path=%mysql_home%\bin
3. The key step is to set the My.ini, mine is
# for advice The change settings see# http://dev.mysql.com/doc/refman/5.6/en/ server-configuration-defaults.html# * * * does not EDIT the this FILE. It's a template which'll be copied to the# * * * default location during install, and would be replaced if you# * * * Upgrade To a newer version of MySQL. [mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128m# Remove Leading # to turn on a V ery important data Integrity option:logging# changes to the binary log between backups.# log_bin# These is commonly set, Remove the # and set as required.# Basedir = ..... # DataDir = ... # ... # port = ... ... # server_id = .... # Remove leading # to Set options mainly useful for reporting servers.# the server defaults is faster for transactions and fast selects.# Adju St sizes as needed, experiment to find the optimal values.# join_buffer_size = 128m# sort_buffer_size = 2m# Read_rnd_buffer_size = 2M Basedir = D:\\software\\mysql-5.6.37-winx64\datadir = d:\\software\\mysql-5.6.37-winx64\ Data\port = 3306server_id = 1sql_mode=no_engine_substitution,strict_trans_tables general-log=0 general_log_file= " Mysql_general.log "Slow-query-log=1 slow_query_log_file=" Mysql_slow_query.log "long_query_time=10 log-error=" MySQL _error_log.err "Default-storage-engine=innodb max_connections=1024 query_cache_size=128m Key_buffer_size=128M Innod B_flush_log_at_trx_commit=1 innodb_thread_concurrency=128 innodb_autoextend_increment=128m Tmp_table_size=128M # Re Move leading # To set options mainly useful for reporting servers. # The server defaults is faster for transactions and fast selects. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M #sql_mode =no_engine_substitution,stric T_trans_tables sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution "Character-set-server=utf8 innodb_flush_method=normal
4. Enter CMD as administrator (all below)
5.mysqld--install mysql--defaults-file=d:\software\mysql-5.6.37-winx64\my.ini install MySQL service
6.mysqld--initialize This is to generate the data directory and initialize it
7. Start the service net start MySQL or start in the service
9. mysql-uroot-p Login MySQL
After entering the initial password connection to the MySQL database, change the password as follows:
Set Password=password (' 123456 ');
Flush privileges;
To log out again, use the new password:
mysql-uroot-p123456
64-bit WIN10 installation mysql-5.6.37-winx64