MySQL 5.7.17 installation and configuration method graphic tutorial under win7

MySQL 5.7.17 installation and configuration method graphic tutorial under win7

I would like to share with you the graphic tutorial on how to install MySQL 5.7.17 under Windows 7.

1. Download the installation package

Please download it from https://dev.mysql.com/downloads/mysql/

There are two types of packages: ZIP package and MSI package. It is recommended that beginners choose ZIP package download to help them familiarize themselves with MySQL.

2. Unzip the MySQL compressed package

After downloading, unzip it and put it in the directory where you want to install it, such as: E:\Mysql\mysql-5.7.17-win32

3. Create and modify the configuration file my.ini

Create a new my.ini file in the corresponding installation directory. You can copy a copy of my-default.ini and change the file name to my.ini, and modify the content of the my.ini file to:

############################

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

#Set port 3306 port = 3306

# Set the installation directory of mysql basedir=E:\Mysql\mysql-5.7.17-win32

# Set the storage directory of mysql database data datadir=E:\Mysql\mysql-5.7.17-win32\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

################################

4. Create a new folder data in the E:\Mysql\mysql-5.7.17-win32 directory

5. Add environment variables

Right-click "Computer" properties, go to the system interface and select "Advanced System Settings", and click "Environment Variables" in "Advanced"

Edit the PATH system variable and add E:\Mysql\mysql-5.7.17-win32\bin; in the first position (note the semicolon)

or:

Create a new variable named "MYSQL_HOME" in the system environment variables. Variable value: "E:\Mysql\mysql-5.7.17-win32"

Edit the existing environment variable "Path" and add "%MYSQL_HOME%\bin" at the end.

6. Uninstall, reinstall, initialize MYSQL, and finally start the MYSQL service.

Open the cmd command line as an administrator, enter the bin directory where the database is installed, and enter the following commands in sequence:

 E:\Mysql\mysql-5.7.17-win32\bin>mysqld --install //Install mysql service E:\Mysql\mysql-5.7.17-win32\bin>mysqld --initialize //Must initialize E:\Mysql\mysql-5.7.17-win32\bin>net start mysql //Start mysql service

7. Log in to MySQL

Execute in the bin directory: mysql -u root -p You will be asked to enter the password

The password is randomly assigned during initialization in the previous step. You need to go to the data directory to find the .err file and open it with text, as follows:

8. Change password:

After successful login, alter user 'root'@'localhost' identified by 'new password';

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:
  • MySQL 5.7.17 installation and configuration method graphic tutorial
  • mysql5.7.17.msi installation graphic tutorial
  • Tutorial on installing mysql5.7.17 on windows10
  • MySQL 5.7.17 installation and configuration graphic tutorial
  • MySQL 5.7.17 installation and configuration method graphic tutorial (windows)
  • MySQL 5.7.17 installation and configuration method graphic tutorial (CentOS7)
  • MySQL 5.7.17 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.17 installation and configuration tutorial for Mac
  • MySQL 5.7.17 winx64 installation and configuration graphic tutorial
  • MySQL 5.7.17 installation and configuration method graphic tutorial under Windows 10
  • Mysql5.7.17 winx64.zip decompression version installation and configuration graphic tutorial
  • MySQL 5.7.17 winx64 decompression version installation and configuration method graphic tutorial

<<:  Node.js file copying, folder creation and other related operations

>>:  Linux automatically deletes logs and example commands from n days ago

Recommend

A brief talk about Mysql index and redis jump table

summary During the interview, when discussing abo...

CSS3 achieves cool sliced ​​image carousel effect

Today we will learn how to use CSS to create a co...

A link refresh page and js refresh page usage examples

1. How to use the link: Copy code The code is as f...

Analyzing the troublesome Aborted warning in MySQL through case studies

This article mainly introduces the relevant conte...

MySQL character types are case sensitive

By default, MySQL character types are not case-se...

TypeScript installation and use and basic data types

The first step is to install TypeScript globally ...

Automatically log out inactive users after login timeout in Linux

Method 1: Modify the .bashrc or .bash_profile fil...

Call and execute host docker operations in docker container

First of all, this post is dedicated to Docker no...

Pygame code to make a snake game

Table of contents Pygame functions used Creating ...

Example code for configuring monitoring items and aggregated graphics in Zabbix

1. Install Zabbix Agent to monitor the local mach...

HTML form tag tutorial (1):

Forms are a major external form for implementing ...

Implementation of Nginx load balancing cluster

(1) Experimental environment youxi1 192.168.5.101...

Summary of methods for cleaning Mysql general_log

Method 1: SET GLOBAL general_log = 'OFF';...

Use of MySQL official export tool mysqlpump

Table of contents Introduction Instructions Actua...

A brief discussion on the performance issues of MySQL paging limit

MySQL paging queries are usually implemented thro...