Detailed explanation of MySql 5.7.17 free installation configuration tutorial

Detailed explanation of MySql 5.7.17 free installation configuration tutorial

1. Download the mysql-5.7.17-winx64.zip installation package (link: https://dev.mysql.com/downloads/mysql/)

2. Unzip the installation package.

D:\DevelopTool\mysql-5.7.17-winx64 #Unzip directory

3. Create a folder named data in the decompressed directory to store data

D:\DevelopTool\mysql-5.7.17-winx64\data

4. Configure the startup file

Copy the D:\DevelopTool\mysql-5.7.17-winx64\my-default.ini file, rename it to my.ini, and modify the parameters in it as follows:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during installation, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
#########################
# basedir is the directory after the installation file is unzipped | basedir and datadir can use relative paths # basedir=./..
basedir=D:\\DevelopTool\\mysql-5.7.11-winx64
# datadir is the directory used to store data# datadir=./../data
datadir=D:\\DevelopTool\\mysql-5.7.11-winx64\\data
# port is the port number port=3306
# mar_connections is the maximum number of connections max_connections=20
character_set_server=utf8
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 
explicit_defaults_for_timestamp=true
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

5. Initialize the data directory

mysqld --defaults-file="D:\DevelopTool\mysql-5.7.17-winx64\my.ini" --initialize-insecure

It will initialize the data directory. Please delete all files in the data directory before executing this command, otherwise it will fail.

You can choose to initialize with --initialize-insecure or --initialize. --initialize-insecure initializes the root password to empty. If you use --initialize to initialize, a random password will be generated.

After successful execution, directory files such as mysql, performance_schema, and sys will be generated in the data directory.

6. Install and start mysql service

#Install service mysqld -install
#Start the service net start mysql
#Enter mysql
mysql -u root -p
#Remove mysql
mysqld -remove

You can refer to the following MySQL topics provided by this site:

Mysql installation tutorials in various systems

Mysql Root Password Operation Skills

MySql Database Getting Started Tutorial

Summary of database operation knowledge in MySQL

The above is a detailed explanation of the MySql 5.7.17 free installation configuration tutorial 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:
  • Detailed tutorial for upgrading MySQL 5.7.17 free installation version on Windows (x86, 64bit)
  • MySQL 5.7.17 free installation version configuration method graphic tutorial (windows10)
  • MySQL 5.7.17 winx64 free installation version configuration method graphic tutorial
  • Mysql 5.7.17 winx64 free installation version, installation and configuration graphic tutorial under win10 environment

<<:  js dynamically adds example code for a list of circled numbers

>>:  A detailed introduction to Tomcat directory structure

Recommend

Hide HTML elements through display or visibility

Sometimes we need to control whether HTML elements...

Simple usage example of vue recursive component

Preface I believe many students are already famil...

Quickly master the use of Docker to build a development environment

As the platform continues to grow, the project...

Example of converting timestamp to Date in MySQL

Preface I encountered a situation at work: In the...

How to use css overflow: hidden (overflow hiding and clearing floats)

Overflow Hide It means hiding text or image infor...

Nginx stream configuration proxy (Nginx TCP/UDP load balancing)

Prelude We all know that nginx is an excellent re...

HTML form tag usage learning tutorial

Forms in HTML can be used to collect various type...

A brief analysis of Vue's asynchronous update of DOM

Table of contents The principle of Vue asynchrono...

Introduction to common MySQL storage engines and parameter setting and tuning

MyISAM, a commonly used storage engine in MySQL c...

Detailed explanation of the use of $emit in Vue.js

1. Parent components can use props to pass data t...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

How to install Docker and configure Alibaba Cloud Image Accelerator

Docker Installation There is no need to talk abou...