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

How to add shortcut commands in Xshell

As a useful terminal emulator, Xshell is often us...

MySQL performance optimization: how to use indexes efficiently and correctly

Practice is the only way to test the truth. This ...

Transplanting the mkfs.vfat command in busybox under Linux system

In order to extend the disk life for storing audi...

Detailed explanation of using scp command to copy files remotely in Linux

Preface scp is the abbreviation of secure copy. s...

MySQL 8.0.21 installation and configuration method graphic tutorial

Record the installation and configuration method ...

How to use regular expression query in MySql

Regular expressions are often used to search and ...

Implementing carousel effects with JavaScript

This article shares the specific code for JavaScr...

In-depth analysis of the role of HTML <!--...--> comment tags

When we check the source code of many websites, w...

MySQL study notes on handling duplicate data

MySQL handles duplicate data Some MySQL tables ma...

Detailed tutorial on configuring nginx for https encrypted access

environment: 1 CentOS Linux release 7.5.1804 (Cor...

Example code and method of storing arrays in mysql

In many cases, arrays are often used when writing...

14 Ways to Create Website Content That Engages Your Visitors

When I surf the Net, I often see web sites filled...

Sharing some wonderful uses of wxs files in WeChat applet

Table of contents Preface application Filters Dra...