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

HTML basics summary recommendation (paragraph)

HTML Paragraph Paragraphs are defined by the <...

Record a slow query event caused by a misjudgment of the online MySQL optimizer

Preface: I received crazy slow query and request ...

Detailed explanation of Vue's simple store

The simplest application of store in Vue is globa...

How to build DockerHub yourself

The Docker Hub we used earlier is provided by Doc...

VMware and CentOS system installation method to reset the root password

Today's Tasks 1. Choice of Linux distribution...

MySQL query method with multiple conditions

mysql query with multiple conditions Environment:...

A brief analysis of the use of zero copy technology in Linux

This article discusses several major zero-copy te...

Summary of Common Letters in Unicode

Most of the earliest computers could only use ASC...

In-depth explanation of iterators in ECMAScript

Table of contents Preface Earlier iterations Iter...

Solve the problem that the docker container cannot ping the external network

Today, when I was building a redis environment in...

Explanation of the concept and usage of Like in MySQL

Like means "like" in Chinese, but when ...

Summary of using the exclamation mark command (!) in Linux

Preface Recently, our company has configured mbp,...

MySQL Optimization: Cache Optimization

I am happy that some bloggers marked my article. ...