English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Install MySQL under Windows using the noinstall method 5.7.5 m15 winx64(Recommended)

Download and extract without saying

I extracted it to: E:\DBFiles\mysql-5.7.15-winx64\mysql-5.7.15-winx64

Add configuration file E:\DBFiles\mysql-5.7.15-winx64\mysql-5.7.15-winx64\my.ini

####################Configuration File Begins###################
[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=1M
tmp_table_size=32M
thread_cache_size=8
innodb_data_home_dir="E:\DBFiles\mysql-5.7.15-winx64\mysql-5.7.15-winx64/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
####################End of configuration file###################

The zip package does not contain the data directory, so initialization is required: 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 that the installation is successful

After the service is successfully registered, start the MySQL service, the MySQL service can start successfully, and when prompted to enter the password with the root user, it means that the root password has not been set yet

Stop the service, add a 'skip' in the my.ini file-grant-tables=1The configuration allows skipping the password, after modification, restart the MySQL service, and the root user can log in normally

The password is modified after logging in, using the method of 'alter user root identified by 'root''

Hint: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

Then refer to the Internet, using: update user set authentication_string=PASSWORD('root') where User='root'; It can be modified successfully

The password is modified by the method of 'update user set authentication_string=password('root') where user ='root' and it prompts that the operation is successful

After changing the password, remove the skip configuration above-grant-tables=1Log in with the root user and the password root just set, no problem,

But when I used the use mysql command to switch data, it prompted me to change the password again?

Then I executed: alter user 'root'@'localhost' identified by 'root';

Now it's finally done

Then, with the HeidiSQL management tool, it can be connected normally:

During the password change, it used: alter user 'root'@'localhost' identified by 'root';

Hint: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

Then refer to the Internet, using: update user set authentication_string=PASSWORD('root') where User='root'; It can be modified successfully

However, during the restart, it asked to change the password, using: alter user 'root'@'localhost' identified by 'root'; This completes the modification of the root password.

Previously, it was installed step by step, and this time mysql was installed through the uninstall method. Due to repeated testing, many problems were encountered in the middle, and it took three times of troubleshooting to succeed.

The following is the introduction of installing mysql in the Windows noinstall mode introduced by the editor 5.7.5 m15 winx64All the descriptions above, I hope it will be helpful to everyone. If you have any questions, please leave me a message, and I will reply to everyone in time. I am also very grateful for everyone's support for the Naoa Tutorial website!

You May Also Like