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
Preface If you are going to interview for a Linux...
Installation environment: CentOS7 64-bit, MySQL5....
NAT In this way, the virtual machine's networ...
Table of contents 1. Install Docker 2. Pull the J...
1. Single table query -> update UPDATE table_n...
Carousel The main idea is: In the large container...
1. Problem introduction Assume a scenario where a...
After being tortured by the front-end cross-domai...
Suppose a user management system where each perso...
I've been learning Kafka recently. When I was...
Replace it with the optimal database connection p...
<br />According to foreign media reports, in...
1. Install openssh-server yum install -y openssl ...
Structured Table (IExplore Only) 1) Group by rows ...
The simple installation configuration of mysql5.7...