Window environment configuration Mysql 5.7.21 windowx64.zip free installation version tutorial detailed explanation

Window environment configuration Mysql 5.7.21 windowx64.zip free installation version tutorial detailed explanation

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 cd E:\mysql\bin

Generate mysql service (that is, install my.ini file)

E:\mysql\bin>mysqld -install;
Service successfully installed.

Generate data directory E:\mysql\bin> mysqld --initialize-insecure --user=mysql ;

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;
Stop mysql service net stop mysql;
Generate service mysqld -install;
Delete service mysqld -remove;
Log in to the database mysql -u root -p;
Exit mysql> quit;

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:
  • MySQL 5.6.36 Windows x64 version installation tutorial detailed
  • Problems encountered when installing mysql 5.7.9 winx64 on windows
  • Install MySQL 5.7.5 m15 winx64 in Windows with noinstall (recommended)
  • Solution to catastrophic failure of windows6.1-KB958488-V6001-x64 installed in Win2008 R2 with .NET Framework 4
  • Windows Vista Simplified Chinese Version X64 Version Original Image Download
  • Windows Server 2003 Service Pack 2 for x86 & x64 released

<<:  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

Recommend

VMware, nmap, burpsuite installation tutorial

Table of contents VMware BurpSuite 1. Virtual mac...

Detailed explanation of how to introduce custom fonts (font-face) in CSS

Why did I use this? It all started with the makin...

A brief discussion on the magical slash in nginx reverse proxy

When configuring nginx reverse proxy, the slashes...

jQuery+swiper component realizes the timeline sliding year tab switching effect

Result: Implementation code: Need to be used with...

Detailed explanation of Vue development website SEO optimization method

Because the data binding mechanism of Vue and oth...

A brief discussion on the solution to excessive data in ElementUI el-select

Table of contents 1. Scenario Description 2. Solu...

Detailed explanation of JavaScript state container Redux

Table of contents 1. Why Redux 2. Redux Data flow...

Usage of Linux userdel command

1. Command Introduction The userdel (user delete)...

js to achieve cool fireworks effect

This article shares the specific code for using j...

MySQL 8.0.20 winx64 installation and configuration method graphic tutorial

This article shares with you the installation and...

Detailed explanation of the WeChat applet request pre-processing method

question Because some of our pages request data i...

SQL implementation of LeetCode (175. Joining two tables)

[LeetCode] 175.Combine Two Tables Table: Person +...

Solutions to VMware workstation virtual machine compatibility issues

How to solve VMware workstation virtual machine c...

How to implement DIV's blur function

Use anti-shake to make DIV disappear when the mou...