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

Centos7 installation of Nginx integrated Lua sample code

Preface The computer I use is a Mac, and the oper...

MySQL 8.0 upgrade experience

Table of contents Preface 1. First completely uni...

How to run the react project on WeChat official account

Table of contents 1. Use the a tag to preview or ...

Solve the error problem caused by modifying mysql data_dir

Today, I set up a newly purchased Alibaba Cloud E...

HTML table border control implementation code

Generally, when we use a table, we always give it...

User experience of portal website redesign

<br />From the launch of NetEase's new h...

Vue.js implements music player

This article shares the specific code of Vue.js t...

The difference between this.$router and this.$route in Vue and the push() method

The official document states: By injecting the ro...

What is the use of the enctype field when uploading files?

The enctype attribute of the FORM element specifie...

Detailed explanation of MySQL table name case-insensitive configuration method

By default, MySQL in Linux distinguishes between ...

Vue implements table paging function

This article example shares the specific code of ...

Complete steps to use element in vue3.0

Preface: Use the element framework in vue3.0, bec...