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

MySQL index coverage example analysis

This article describes MySQL index coverage with ...

Skin change solution based on Vue combined with ElementUI

Table of contents Written in front Solution 1: Us...

Create a movable stack widget function using flutter

This post focuses on a super secret Flutter proje...

In-depth understanding of slot-scope in Vue (suitable for beginners)

There are already many articles about slot-scope ...

Example of using CSS3 to customize the style of input multiple-select box

Principle: First hide the input element, then use...

VMware Workstation Pro installs Win10 pure version operating system

This article describes the steps to install the p...

How to configure mysql5.6 to support IPV6 connection in Linux environment

Introduction: This article mainly introduces how ...

How to configure domestic sources in CentOS8 yum/dnf

CentOS 8 changed the software package installatio...

Example code for implementing the "plus sign" effect with CSS

To achieve the plus sign effect shown below: To a...

MySQL Index Detailed Explanation

Table of contents 1. Index Basics 1.1 Introductio...

How to change the root password of Mysql5.7.10 on MAC

First, start MySQL in skip-grant-tables mode: mys...

How to install and deploy zabbix 5.0 for nginx

Table of contents Experimental environment Instal...