MySQL community server 8.0.16 installation and configuration method graphic tutorial under Windows

MySQL community server 8.0.16 installation and configuration method graphic tutorial under Windows

I have seen a lot of MySQL-related syntax recently. I also want to learn how to write some MySQL stored procedures, so I want to install MySQL. I encountered some problems in the process, which I will record here~

Step 1: Download

First, go to the official website to download the MySQL version that matches your computer. The URL is as follows: https://www.mysql.com/

Then, go to the download page:

1) Go to the download page

2) Find the location in the red box

3) Click Download

4) Go to the download page, find the matching version on the page, and click Download

5) Unzip after downloading: D:\Users\chen_lib\mysql-8.0.16-winx64 (here Xiaobai unzips to this address)

Step 2: Configure environment variables

Variable Name: MYSQL_HOME

Variable value: D:\Users\chen_lib\mysql-8.0.16-winx64

Add to path: %MYSQL_HOME%\bin

Step 3: Installation

1. Generate data file

In Start, run cmd

Enter the D:\Users\chen_lib\mysql-8.0.16-winx64\bin directory. When you cd here, you cannot add a slash after D:, otherwise an error will be reported.

After entering the path, execute the command mysqld --initialize-insecure --user=mysql

At this time, the data directory is generated in the D:\Users\chen_lib\mysql-8.0.16-winx64 directory.

2. Start the service:

Execute the command: net start mysql to start the MySQL service. Here I encountered an error;

Solution:

Execute the command: mysqld -install

In fact, the installation is successful here, but I have to test it. I encountered a problem when testing it here. Continue down~

Log in to mysql: (Because no password was set before, the password is blank, no need to enter a password, just press Enter)

Command: mysql -u root -p

Unable to connect here.

Solution:

Follow this operation and find MySQL to start it

Try again: Success

Next, check the password.

Command: mysql> select host,user,authentication_string from mysql.user;

You can also modify or set the user password:

Command: update mysql.user set authentication_string=password("123456") where user="root";

To take effect, you need to type this command again: flush privileges;

Exit MySql

Command: quit

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 8.0.16 installation and configuration method graphic tutorial under Windows
  • mysql installer community 8.0.16.0 installation and configuration graphic tutorial
  • MySQL 8.0.16 compressed package installation and configuration method graphic tutorial
  • MySQL 8.0.16 installation and configuration tutorial under Windows 10
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial
  • mysql 8.0.16 winx64.zip installation and configuration method graphic tutorial
  • The latest graphic tutorial of mysql 8.0.16 winx64 installation under win10
  • MySQL 8.0.16 installation and configuration tutorial under CentOS7
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.16 Win10 zip version installation and configuration graphic tutorial

<<:  How to deploy your first application with Docker

>>:  Detailed analysis of the blocking problem of js and css

Recommend

Use three.js to achieve cool acid style 3D page effects

This article mainly introduces how to use the Rea...

Vue implements partial refresh of the page (router-view page refresh)

Using provide+inject combination in Vue First you...

40 CSS/JS style and functional technical processing

1- Styling dropdown select boxes - Modify the dro...

HTML uncommon tags optgroup, sub, sup and bdo example code

Optgroup is used in the select tag to make the dro...

Canonical enables Linux desktop apps with Flutter (recommended)

Google's goal with Flutter has always been to...

Three common style selectors in html css

1: Tag selector The tag selector is used for all ...

MySQL 5.7.18 free installation version configuration tutorial

MySQL 5.7.18 free installation version installati...

Detailed explanation of SELINUX working principle

1. Introduction The main value that SELinux bring...

How to upgrade CentOS7 to CentOS8 (detailed steps)

This article uses a specific example to introduce...

Specific usage instructions for mysql-joins

Table of contents Join syntax: 1. InnerJOIN: (Inn...

Create an SSL certificate that can be used in nginx and IIS

Table of contents Creating an SSL Certificate 1. ...

Brief analysis of the introduction and basic usage of Promise

Promise is a new solution for asynchronous progra...