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

Why the explain command may modify MySQL data

If someone asked you whether running EXPLAIN on a...

How to use Spark and Scala to analyze Apache access logs

Install First you need to install Java and Scala,...

Solve the problem that Navicat cannot connect to MySQL on the Linux server

At the beginning, I felt sad. The screenshots are...

jQuery realizes dynamic particle effect

This article shares the specific code of jQuery t...

Solve the problem of inconsistency between mysql time and system time in docker

Recently, when I installed MySQL in Docker, I fou...

Writing and understanding of arrow functions and this in JS

Table of contents Preface 1. How to write functio...

Summary of the differences between global objects in nodejs and browsers

In Node.js, a .js file is a complete scope (modul...

How to import Excel files into MySQL database

This article shares with you how to import Excel ...

jQuery plugin to implement dashboard

The jquery plug-in implements the dashboard for y...

CSS setting div background image implementation code

Adding background image control to a component re...