1. Download mysql-5.7.21-windowx64.zip from the official website mysql download page 2. Unzip to a suitable location (E:\mysql) I changed the name 3. Configure environment variables and add E:\mysql\bin to PATH 4. Create the my.ini file in the mysql directory (E:\mysql) with the following content: [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 # Set the installation directory of mysql to basedir=E:\mysql # Set the storage directory of mysql database data datadir=E:\mysql\data # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB "#" is a comment 5. Run cmd as an administrator Change directory Generate mysql service (that is, install my.ini file) E:\mysql\bin>mysqld -install; Service successfully installed. Generate data directory If the generation fails here, see below E:\mysql\bin>cd ../ E:\mysql> mysqld --initialize-insecure --user=mysql; Start mysql service E:\mysql\bin> net start mysql; The MySQL service is starting. The MySQL service has been started successfully. 6. Log in to the database and change the password (the default is empty) E:\mysql\bin>mysql -u root -p; Enter password: //Press Enter here Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.21 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> Change Password mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | |mysql | | performance_schema | |sys| +--------------------+ 4 rows in set (0.00 sec) mysql> use mysql; Database changed mysql> set password for 'root'@'localhost'=password('new password'); mysql> flush privileges; Whether the exit test is successful mysql> quit; E:\mysql\bin>mysql -u root -p; Enter password: Notes: In MySQL, add a ; to end a statement. Start mysql service net start mysql; Summarize The above is a detailed tutorial on configuring Mysql 5.7.21 windowx64.zip free installation version in the window environment introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Two ways to create SSH server aliases in Linux
>>: Detailed explanation of the use of Gulp.js, a powerful tool for front-end task construction
Table of contents VMware BurpSuite 1. Virtual mac...
Why did I use this? It all started with the makin...
When configuring nginx reverse proxy, the slashes...
Result: Implementation code: Need to be used with...
Because the data binding mechanism of Vue and oth...
Table of contents 1. Scenario Description 2. Solu...
Table of contents 1. Why Redux 2. Redux Data flow...
1. Command Introduction The userdel (user delete)...
This article shares the specific code for using j...
This article shares with you the installation and...
What is text wrapping around images? This is the ...
question Because some of our pages request data i...
[LeetCode] 175.Combine Two Tables Table: Person +...
How to solve VMware workstation virtual machine c...
Use anti-shake to make DIV disappear when the mou...