1. Download the installation package from the official website:Mysql-5.7.12-win32.zip
2. Unzip to C drive (any drive letter is OK)
C:\mysql-5.7.12-win32
3. Modify the configuration file: C:\mysql-5.7.12-win32\my-default.ini
# for advice The 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 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 in a very important data integrity option:logging# changes to th e binary log between backups.# log_bin# These is commonly set, remove the # and set as required.basedir = "C:\mysql-5.7.12-win32" DataDir = "C:\mysql-5.7.12-win32\data2016" port = 3306# server_id = ... # Remove leading # To set options mainly useful for reporting servers.# the server defaults is faster fo R 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,strict_trans_ TABLES
4. Configure the system environment variable path= .... (previous plus) .... ; C:\mysql-5.7.12-win32\bin
5. Execute the following command:
mysqld --initialize-insecuremysql-installnet start MySQL (or net Start MySQL)
(If you want to reinstall, you need to remove:mysql--remove)
6. If normal, the following information will be displayed:
C:\mysql-5.7.12-win32\bin>net Start Mysqlmysql service is starting. The MySQL service has started successfully.
If you start an error, you can check MySQL error log: C:\mysql-5.7.12-win32\data2016\HEJT6VWINGVD59M. Err
The password for the newly installed MySQL root user is empty, so you can connect directly:mysql-u root-p
MySQL Green edition installation (MYSQL-5.7.12-WIN32)