My personal summary of mysql 5.7 database installation steps

My personal summary of mysql 5.7 database installation steps

1.mysql-5.7.19-winx64.zip (this is the free installation version, about 318 MB, there is also an installation version, about 380 MB mysql-installer-community-5.7.19.0.msi) Unzip this installation package to the specified disk
2. It is best to change the decompressed file name to mysql
3. Check if there is a data folder in the mysql folder. If not, create a new one.
4. Open the mysql folder and create a new my.ini (note the format) file to overwrite my-default.ini (it doesn’t matter if you don’t see this file)
5.My.ini is like this
[mysql]
# Set the default character set for the mysql client
default-character-set=utf8
[mysqld]
#Set port 3306
port = 3306
# Set the installation directory of mysql
basedir=D:\mysql //Change to your own installation directory
# Set the storage directory for mysql database data
datadir=D:\mysql\data //Change to your own installation directory
# Maximum number of connections allowed
max_connections=1000
# 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 new tables
default-storage-engine=INNODB

6. Open cmd and find the bin directory, for example D:\>cd mysql\bin Enter the command: D:\mysql\bin>mysqld -install
Get this feedback: Service successfully installed.
7. Enter the command: mysqld --initialize to initialize (it will take a little longer)
8. Start mysql
D:\mysql\bin>net start mys
The MySQL service is starting.
The MySQL service has been started successfully.
9. Since the password of the newly installed database is automatically generated, you need to open the mysql\data folder and find the computer name-PC.err file.
Open and find the line "porary password is generated for root@localhost: RF%B:iXgo1sp". This RF%B:iXgo1sp is the automatically generated password. Then log in to mysql, mysql -uroot -p and copy the password.
Then change the password you want: command: set password for root@localhost = password('new password');
10. The database is installed successfully. Welcome to use MySQL database

<<:  Detailed explanation of the fish school algorithm in CocosCreator game

>>:  Detailed explanation of tcpdump command examples in Linux

Recommend

MySQL index principle and usage example analysis

This article uses examples to illustrate the prin...

jQuery implements simple button color change

In HTML and CSS, we want to set the color of a bu...

How to use custom tags in html

Custom tags can be used freely in XML files and HT...

MySQL 5.7.21 installation and configuration tutorial under Window10

This article records the installation and configu...

Graphical explanation of the solutions for front-end processing of small icons

Preface Before starting this article, let’s do a ...

HTML CSS3 does not stretch the image display effect

1. Use the transform attribute to display the ima...

The functions and differences between disabled and readonly

1: readonly is to lock this control so that it can...

Brief Analysis of MySQL B-Tree Index

B-Tree Index Different storage engines may also u...

Vue implements page caching function

This article example shares the specific code of ...

Usage and execution process of http module in node

What is the role of http in node The responsibili...

Detailed steps to build the TypeScript environment and deploy it to VSCode

Table of contents TypeScript environment construc...

Use pure CSS to disable the a tag in HTML without JavaScript

In fact, this problem has already popped up when I...

Install docker offline by downloading rpm and related dependencies using yum

You can use yum to install all dependencies toget...

How to create LVM for XFS file system in Ubuntu

Preface lvm (Logical Volume Manager) logical volu...