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

Comprehensive analysis of isolation levels in MySQL

When the database concurrently adds, deletes, and...

How to implement property hijacking with JavaScript defineProperty

Table of contents Preface Descriptors Detailed ex...

SQL Optimization Tutorial: IN and RANGE Queries

Preface "High Performance MySQL" mentio...

The benefits of div+css and web standard pages

The div element is used to provide structure and b...

How to solve the problem that MySQL cannot start because it cannot create PID

Problem Description The MySQL startup error messa...

MySQL Query Cache and Buffer Pool

1. Caches - Query Cache The following figure is p...

Nginx builds rtmp live server implementation code

1. Create a new rtmp directory in the nginx sourc...

Docker stop stops/remove deletes all containers

This article mainly introduces Docker stop/remove...

Implementing a shopping cart with native JavaScript

This article shares the specific code of JavaScri...

How to operate MySql database with gorm

1. Setting case sensitivity of fields in the tabl...

IE6/7 is going to be a mess: empty text node height issue

Preface: Use debugbar to view document code in iet...

How to install kibana tokenizer inside docker container

step: 1. Create a new docker-compose.yml file in ...

CSS float property diagram float property details

Using the CSS float property correctly can become...