MySQL 5.7.21 installation and configuration tutorial

MySQL 5.7.21 installation and configuration tutorial

The simple installation configuration of mysql5.7.21 is as follows

1. MySQL installation

1. Download the community version from the official website

2. Unzip to drive C: C:\mysql-5.7.21-winx64

3. Run the command line as an administrator and enter the directory C:\mysql-5.7.21-winx64\bin

4. Register service: C:\mysql-5.7.21-winx64\bin> mysqld install mysql5.7.21

5. Initialize the database: C:\mysql-5.7.21-winx64\bin> mysqld --initialize

6. Start the database: C:\mysql-5.7.21-winx64\bin> net start mysql5.7.21

7. Log in to the database: C:\mysql-5.7.21-winx64\bin> mysql -u root -p

Note: The login password is found in the *.err file in the MySQL installation directory, for example, the red characters: 2018-01-17T09:26:11.260249Z 1 [Note] A temporary password is generated for root@localhost: _=(H,?pX.7yZ

8. Change the root user password: C:\mysql-5.7.21-winx64\bin> mysqladmin -uroot -p_=(H,?pX.7yZ password 1234

MySQL Configuration

1. Create C:\mysql-5.7.21-winx64\my.ini by yourself. The content of the file is as follows:

[mysqld]
#Set port 3306 port = 3306
# Set the installation directory of mysql to basedir=C:\mysql-5.7.21-winx64
# Set the storage directory of mysql database data datadir=C:\mysql-5.7.21-winx64\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
# Set to strict mode sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8

Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed tutorial for installing mysql5.7.21 under Windows system
  • MySQL 5.7.21 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.21 installation and password configuration tutorial
  • MySQL 5.7.21 decompression version installation and configuration method graphic tutorial
  • MySQL 5.7.21 installation and configuration method graphic tutorial (window)
  • mysql installer web community 5.7.21.0.msi installation graphic tutorial
  • MySQL 5.7.21 winx64 free installation version configuration method graphic tutorial
  • MySQL 5.7.21 decompression version installation and configuration method graphic tutorial (win10)
  • MySQL 5.7.20\5.7.21 free installation version installation and configuration tutorial
  • MySQL 5.7.21 decompression version installation and configuration graphic tutorial

<<:  JavaScript to achieve simple image switching

>>:  Example of using Nginx reverse proxy to go-fastdfs

Recommend

MySQL automatically inserts millions of simulated data operation code

I use Navicat as my database tool. Others are sim...

Detailed explanation of basic management of KVM virtualization in CentOS7

1. Install kvm virtualization : : : : : : : : : :...

Let's talk in detail about the direction of slow SQL optimization in MySQL

Table of contents Preface SQL statement optimizat...

Detailed explanation of the application of CSS Sprite

CSS Sprite, also known as CSS Sprite, is an image...

How to start Vue project with M1 pro chip

Table of contents introduction Install Homebrew I...

JavaScript to achieve magnifying glass effect

This article shares the specific code for JavaScr...

HTML+CSS to create heartbeat special effects

Today we are going to create a simple heartbeat e...

Summary of various implementation methods of mysql database backup

This article describes various ways to implement ...

HTML sub tag and sup tag

Today I will introduce two HTML tags that I don’t...

Write a simple calculator using JavaScript

The effect is as follows:Reference Program: <!...

Detailed explanation of querying JSON format fields in MySQL

During the work development process, a requiremen...

Web design must also first have a comprehensive image positioning of the website

⑴ Content determines form. First enrich the conten...