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

Summary of the 10 most frequently asked questions in Linux interviews

Preface If you are going to interview for a Linux...

MySQL 5.7 installation and configuration tutorial under CentOS7 (YUM)

Installation environment: CentOS7 64-bit, MySQL5....

VMware virtual machine three connection methods example analysis

NAT In this way, the virtual machine's networ...

Detailed process of installing Jenkins-2.249.3-1.1 with Docker

Table of contents 1. Install Docker 2. Pull the J...

MySQL select results to perform update example tutorial

1. Single table query -> update UPDATE table_n...

Several methods of implementing carousel images in JS

Carousel The main idea is: In the large container...

MySQL database deletes duplicate data and only retains one method instance

1. Problem introduction Assume a scenario where a...

Detailed Analysis of the Selection of MySQL Common Index and Unique Index

Suppose a user management system where each perso...

Implementation of Docker to build Zookeeper&Kafka cluster

I've been learning Kafka recently. When I was...

Instructions for using the database connection pool Druid

Replace it with the optimal database connection p...

IE8 browser will be fully compatible with Web page standards

<br />According to foreign media reports, in...

Install and configure ssh in CentOS7

1. Install openssh-server yum install -y openssl ...

HTML tbody usage

Structured Table (IExplore Only) 1) Group by rows ...

MySQL 5.7.21 installation and configuration tutorial

The simple installation configuration of mysql5.7...