Installation tutorial of MySQL 5.7 green version under windows2008 64-bit system

Installation tutorial of MySQL 5.7 green version under windows2008 64-bit system

Preface

This article introduces the installation tutorial of MySQL 5.7 green version, which is shared for reference and learning by friends in need. Let's take a look at the detailed introduction:

Installation environment: windows2008 R2, X64

1. Download and decompress

Official website download address: http://dev.mysql.com/downloads/mysql/

Select the version that corresponds to your environment and then unzip it. I unzipped it to C:\work\mysql-5.7.17-winx64

2. Environment variable configuration

Add C:\work\mysql-5.7.17-winx64\bin to the user's environment variable path

3. Add configuration files

Copy a copy of my-default.ini, paste it in the current directory as my.ini, and add the following content

[client]
default-character-set=utf8
[mysqld]
character_set_server=utf8
basedir=C:\work\mysql-5.7.17-winx64
datadir=C:\work\mysql-5.7.17-winx64\data
port = 3306

Change the default character encoding to UTF-8 to solve the problem of Chinese garbled characters.

4. Database initialization

Open CMD as an administrator and execute the following command:

mysqld --initialize --user=mysql --console


The end part is the initialized random root password, which can be copied from the console first. The next step to change the password will use

5. Change the root password

Run the following command:

mysql -u root -p will prompt you to enter a password

set password for root@localhost = password('root'); Change the password to root


6. Create a new user

Run the following command:

CREATE USER 'admin'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%';


Note: The percent sign in admin'@'% means that any remote client is allowed to connect. root@localhost means only local clients are allowed to connect.

Official documentation: http://dev.mysql.com/doc/refman/5.7/en/adding-users.html

7. Add as system service

Run the following command:

mysqld --install MySQL57

net start MySQL57


To delete the service, run sc delete MySQL57

Summarize

The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM.

You may also be interested in:
  • Detailed tutorial on configuration method of Mysql 5.7.19 free installation version (64-bit)
  • mysql5.7.17 installation and configuration example on win2008R2 64-bit system
  • Tutorial on installing the green version of mysql-5.7.16-winx64 on 64-bit win10 system
  • How to install MySQL 5.7.11 on 64-bit Win10 system (case study)
  • MySQL 5.7.31 64-bit free installation version tutorial diagram

<<:  js canvas realizes slider verification

>>:  Introduction to who command examples in Linux

Recommend

Import csv file into mysql using navicat

This article shares the specific code for importi...

Example of pre-rendering method for Vue single page application

Table of contents Preface vue-cli 2.0 version vue...

How to Monitor Linux Memory Usage Using Bash Script

Preface There are many open source monitoring too...

Explain MySQL's binlog log and how to use binlog log to recover data

As we all know, binlog logs are very important fo...

MySQL database must know sql statements (enhanced version)

This is an enhanced version. The questions and SQ...

onfocus="this.blur()" is hated by blind webmasters

When talking about the screen reading software op...

About scroll bar in HTML/removing scroll bar

1. The color of the scroll bar under xhtml In the ...

Build Tomcat9 cluster through Nginx and realize session sharing

Use Nginx to build Tomcat9 cluster and Redis to r...

Rules for using mysql joint indexes

A joint index is also called a composite index. F...

Vue implements interface sliding effect

This article example shares the specific code of ...

Detailed explanation of various types of image formats such as JPG, GIF and PNG

Everyone knows that images on web pages are genera...

JS 9 Promise Interview Questions

Table of contents 1. Multiple .catch 2. Multiple ...