==MySQL mysql-5.7.14-win32 compressed package (installation-free version) configuration steps==
1. Download the zip file from the MySQL official website. The file name is: mysql-5.7.14-win32.zip
2. Unzip the zip file, the test path is D:\Coding\mysql-5.7.14-win32
3. Add the bin path under the decompression path to the environment variable:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PATH = D:\Coding\mysql-5.7.14-win32\bin;;D:\Coding\Oracle\instantclient_12_1\bin;%JAVA_HOME%\bin;%ORACLE_HOME%;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;D:\Program Files\Git\cmd;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Sybase\DLL;C:\Sybase\BIN;C:\Program Files\Sybase\Sybase Central\win32;C:\Sybase\ASEP
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4. Run a command prompt (cmd.exe, run as administrator on Windows 7 to obtain the appropriate permissions when executing)
5. Change the path of the command prompt to D:\Coding\mysql-5.7.14-win32\bin directory
6. Execute the command mysqld --initialize to perform the initialization operation, the data folder will be automatically generated under D:\Coding\mysql-5.7.14-win32, and the temporary login password of the root user (this command is new after version 5.7) Added, the purpose is to enhance the security of MySQL), located at LingeringNight.err (LingeringNight is the current computer name)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2016-08-29T02:09:38.094246Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-29T02:09:38.094246Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2016-08-29T02:09:38.094246Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2016-08-29T02:09:39.685449Z 0 [Warning] InnoDB: New log files created, LSN=45790 2016-08-29T02:09:40.091050Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2016-08-29T02:09:40.293850Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a4bbd45e-6d8d-11e6-95ab-4437e64201fa. 2016-08-29T02:09:40.340650Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. ---------------------------------------------------A temporary password--------------------------------------------------------------------------- 2016-08-29T02:09:40.340650Z 1 [Note] A temporary password is generated for root@localhost: saajELGy!0oZ ---------------------------------------------------A temporary password--------------------------------------------------------------------------- 2016-08-29T02:10:37.169950Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-29T02:10:37.169950Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2016-08-29T02:10:37.169950Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2016-08-29T02:10:37.169950Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2016-08-29T02:10:37.185550Z 0 [Note] D:\Coding\mysql-5.7.14-win32\bin\mysqld (mysqld 5.7.14) starting as process 2988 ... 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Uses event mutexes 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Memory barrier is not used 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Number of pools: 1 2016-08-29T02:10:37.216750Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2016-08-29T02:10:37.232350Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2016-08-29T02:10:37.247950Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-08-29T02:10:37.325950Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2016-08-29T02:10:37.559951Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2016-08-29T02:10:37.575551Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2016-08-29T02:10:37.715951Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB. 2016-08-29T02:10:37.715951Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2016-08-29T02:10:37.715951Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2016-08-29T02:10:37.715951Z 0 [Note] InnoDB: Waiting for purge to start 2016-08-29T02:10:37.778351Z 0 [Note] InnoDB: 5.7.14 started; log sequence number 2525799 2016-08-29T02:10:37.778351Z 0 [Note] Plugin 'FEDERATED' is disabled. 2016-08-29T02:10:37.793951Z 0 [Note] InnoDB: Loading buffer pool(s) from D:\Coding\mysql-5.7.14-win32\data\ib_buffer_pool 2016-08-29T02:10:37.871951Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2016-08-29T02:10:37.871951Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2016-08-29T02:10:37.871951Z 0 [Note] IPv6 is available. 2016-08-29T02:10:37.871951Z 0 [Note] - '::' resolves to '::'; 2016-08-29T02:10:37.871951Z 0 [Note] Server socket created on IP: '::'. 2016-08-29T02:10:38.137152Z 0 [Note] Event Scheduler: Loaded 0 events 2016-08-29T02:10:38.137152Z 0 [Note] D:\Coding\mysql-5.7.14-win32\bin\mysqld: ready for connections. Version: '5.7.14' socket: '' port: 3306 MySQL Community Server (GPL) 2016-08-29T02:10:38.495953Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160829 10:10:38 2016-08-29T02:13:33.395060Z 2 [Note] Aborted connection 2 to db: 'mysql' user: 'root' host: 'localhost' (Got an error reading communication packets)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7. Copy my-default.ini and change the name to my.ini, add basedir and datadir, and the encoding format:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will 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 total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = D:\Coding\mysql-5.7.14-win32 # datadir = D:\Coding\mysql-5.7.14-win32\data # port = ..... # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are 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,STRICT_TRANS_TABLES # server encoding character-set-server = utf8 [client] default-character-set = utf8
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8. Execute the command mysqld --install MySQL --defaults-file="D:\Coding\mysql-5.7.14-win32\my.ini" to add MySQL to the service,
9. Execute net start MySQL to start the MySQL service
So far, MySQL configuration is successful
==Modify the temporary password of the administrator user root==
2.1 Run cmd.exe as an administrator and execute mysql -u root -p
2.2 Enter a temporary password
2.3 After successful login, enter mysql> set password for root@localhost = password('new password') to change the temporary password.
mysql> set password for root@localhost = password('new password')
== END ==