Install mysql-5.7.5-m15-winx64 in noinstall mode in Windows, mysqlnoinstallwin64
Download and unzip
I decompress on: E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64
Add profile E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64 \ my. ini
#################### Start of the configuration file ################# # [client] default-character-set = utf8 [mysqld] port = 3306 basedir = "E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64 "datadir =" E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64/data/"tmpdir =" E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64/data/"socket =" E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64/data/mysql. sock "log-error =" E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64/data/mysql_error.log "# skip-grant-tables = 1 # server_id = 2 # skip-locking max_connections = 100 table_open_cache = 256 query_cache_size = 1 M tmp_table_size = 32 M thread_cache_size = 8 innodb_data_home_dir = "E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64/data/"bytes = 1 bytes = 128 M bytes = 128 M innodb_log_file_size = 10 M bytes = 16 innodb-autoextend-increment = 1000 join_buffer_size = 128 M sort_buffer_size = 32 M read_rnd_buffer_size = 32 M max_allowed_packet = 32 M 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 #################### end of configuration file ################# ##
The data directory is not included in the zip package. initialize mysqld -- initialize.
Then register the service: E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64 \ bin> mysqld install MySQL -- defaults-file = "E: \ DBFiles \ mysql-5.7.15-winx64 \ mysql-5.7.15-winx64 \ my. ini"
Prompt: Installation successful
After the service is successfully registered, start the MySQL service. The MySQL service can be successfully started. You can use the root user to log on and ask for a password. At this time, the root password has not been set.
Stop the service. In my. ini, add a skip-grant-tables = 1 configuration. you can skip the password and restart the MySQL service. The root user can log on normally.
After logon, change the password by using alter user root identitied by 'root '.
Tip: The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
Then, go to the Internet and use: update user set authentication_string = PASSWORD ('root') where User = 'root'; to modify the PASSWORD.
Update user set authentication_string = password ('root') where user = 'root' to change the password.
After changing the password, remove the configured skip-grant-tables = 1 and use the root user and the password you just set as root to log on. No problem,
But when I use mysql to switch data, I am prompted to change the password?
Then I will execute: alter user 'root' @ 'localhost' identified by 'root ';
Now it's better.
Then the HeidiSQL management tool can be used for normal connection:
When the password is changed in the middle, the following code is used: alter user 'root' @ 'localhost' identified by 'root ';
Tip: The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
Then, go to the Internet and use: update user set authentication_string = PASSWORD ('root') where User = 'root'; to modify the PASSWORD.
However, you can change the password again during the restart by using alter user 'root' @ 'localhost' identified by 'root'; then the root password is changed.
Previously, it was the next step to install mysql. This time, mysql was installed through uninstall. due to repeated tests and many problems encountered in the middle, it was only possible to install mysql three times.
Refer:
Http://www.cnblogs.com/Alex-Zeng/p/5508766.html
Http://www.cnblogs.com/wenthink/p/MySQLInstall.html
Http://blog.csdn.net/a379039233/article/details/46819877