In Windows7, according to MySQL5.71, download the latest version of MySQL from the official website, here is mysql-5.7.17-win32;2, download the mysql-5.7.17-win32.zip extracted to the specified folder, Here the target folder is e:\develop;3, copy the My-default.ini file and name the new file my.ini;4, according to their MySQL extracted to the directory configuration My.ini file, here the My.ini configuration is as follows: ########### ######## #配置文件开始 ################### # for advice in how to change settings * See # http://dev.mysql.com/doc/refman/5.7 /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'll be replaced if you # * * * Upgra De to a newer version of MySQL. [Client] Default-character-set=utf8 [mysqld] Character-set-server=utf8 collation-server=utf8_general_ci port=3306 Basedir = "E:\develop\mysql-5.7.17-win32" DataDir = "e:\develop\mysql-5.7.17-win32/data/" Tmpdir = "E:\develop\ mysql-5.7.17-win32/data/"socket =" E:\develop\mysql-5.7.17-win32/data/mysql.sock "log-error=" E:\develop\ Mysql-5.7.17-win32/data/mysql_error.log "#server_id = 2 #skip-locking max_connections=100 table_open_cache=256 query_cache_size=1m tmp_table_size=32m thread_cache_size=8 innodb_data_home_dir= "E:\develop\ Mysql-5.7.17-win32\data\ "Innodb_flush_log_at_trx_commit =1 innodb_log_buffer_size=128m innodb_buffer_pool_size= 128M innodb_log_file_size=10m innodb_thread_concurrency=16 innodb-autoextend-increment=1000 join_buffer_size = 128M Sort_buffer_size = 32M Read_rnd_buffer_size = 32M max_allowed_packet = 32M explicit_defaults_for_timestamp=true sql-mode = "Strict_trans_tables,no_auto_create_user,no_engine_substitution" #sql_mode =no_engine_substitution,strict_trans _tables################### #配置文件结束 ################## #5, configure the environment variables of MySQL, create mysql_home variable in the system area, the value of MySQL according to directory, here is E:\ Develop\mysql-5.7.17-win32; add mysql_home to the path variable, which is%mysql_home%\bin;6, open the command line tool CMD as an administrator and go to the MySQL command bin directory, where E : \develop\mysql-5.7.17-win32\bin;7, execute the following command: 7.1 mysqld--initialize--user=mysql--console Create user table, generate the following information: E:\develop\ Mysql-5.7.17-win32\bin>mysqld--initialize--user=mysql--console2017-01-04t01: 02:43.711502z 0 [Warning] ' no_zero_date ', ' no_zero_in_date ' and ' Error_for_division_by_zero ' SQL modes should be used wit H Strict mode. They willbe merged with strict mode in a future release.2017-01-04t01:02:44.326080z 0 [Warning] innodb:new log files Crea Ted, lsn=457902017-01-04t01:02:44.675125z 0 [Warning] innodb:creating foreign key Constraintsystem tables.2017-01-04t01:02:44.791639z 0 [Warning] No existing UUID have been found, so we assume that's the first time t Hat This server has been started. Generatinga new uuid:802e6595-d219-11e6-bcf8-10604b7f46dc.2017-01-04t01:02:44.806141z 0 [Warning] Gtid table is not Ready to be used. Table ' mysql.gtid_executed ' cannot be opened.2017-01-04t01:02:44.814642z 1 [Note] A temporary password are generated for [E MAIL PROTECTED]LOCALHOST:TFHWFQIA) 0oQ which Tfhwfqia) 0oQ for the MySQL generated for our temporary password, be sure to write down, the latter to use; 7.2 mysqld install mysql-- defaults-file= "E:\develop\mysql-5.7.17-win32\my.ini" install MySQL service; 7.3 go to MySQL command line interface:, mysql-uroot-p7.4 Modify UserRoot password (must be modified, otherwise cannot pass): Set password = password (' 123456 ') 8, view MySQL character encoding: show VARIABLES like '%character% ';mysql> show VARIABLES like '%character% '; +--------------------------+-----------------------------------------------+| variable_name | Value |+--------------------------+----------------------------------------------- +| character_set_client | UTF8 | | character_set_connection | UTF8 | | Character_set_database | UTF8 | | Character_set_filesystem | binary | | Character_set_results | UTF8 | | Character_set_server | UTF8 | | Character_set_system | UTF8 | | Character_sets_dir | E:\develop\mysql-5.7.17-win32\share\charsets\ |+--------------------------+-----------------------------------------------+8 rows in set, 1 Warning (0.00 sec) indicates that our character encoding configuration is UTF8. 9, well, so far we have completed the installation of MySQL, start a pleasant programming journey!
On the Windows7, follow MySQL5.7.