Steps for installing MySQL 8.0.16 on Windows and solutions to errors

Steps for installing MySQL 8.0.16 on Windows and solutions to errors

1. Introduction:

I think the changes after mysql8 are quite big compared to the previously commonly used versions. Since I have just started to install it, I will start with the basics. Now mysql8 can only be installed using the unzipped configuration version, and the fool-proof installation of the old version will no longer exist. In fact, mysql8 is not particularly troublesome once you know how to install it.

Here are some points to note:

1. mysql8 does not need my.ini, and will automatically generate files in the data folder after decompression. The default port is 3306. If this file exists, mysql initialization fails.

2. If you create and set up a my.ini file, if there is a data file, delete it before initialization. Then initialize

3. After initialization, a password will be automatically generated. Please write it down. You will need to change the password when logging into MySQL later.

4. Change the encryption rules, otherwise you cannot use the tool to connect to MySQL

2. Steps:

1. Download the .zip installation package and unzip it to your own installation location:

Alternatively, other versions may be selected.

2. Open cmd as an administrator and enter the bin directory of mysql.

3. Initialize and write down the generated user password (random password for root) mysqld --initialize --console

4. Install the service mysqld --install

5. Start the mysql service net start mysql

6. Log in with your account and the password you wrote down.

Notice:

7. Change the root password      alter user 'root'@'localhost' identified by '123456';

8. If the error 2059 is displayed at this time, it means you need to change the encryption rules:

mysql -uroot -ppassword #Loginuse mysql; #Select databaseALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Change encryption methodFLUSH PRIVILEGES; #Refresh permissions

That should be it at this point.

Summarize

The above is the steps and errors I introduced to you in solving the installation of MySQL8.0.16 on Windows. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to solve various errors when using JDBC to connect to Mysql 8.0.11
  • Summary of 3 minor errors encountered during MySQL 8.0 installation
  • MySQL 8.0 error The server requested authentication method unknown to the client solution

<<:  Deep understanding of JavaScript syntax and code structure

>>:  Tutorial on resetting the root password of Mac MySQL

Recommend

Detailed explanation of the loading rules of the require method in node.js

Loading rules of require method Prioritize loadin...

MySQL tutorial DML data manipulation language example detailed explanation

Table of contents 1. Data Manipulation Language (...

How to install JDK8 on Windows

1. Download: http://www.oracle.com/technetwork/ja...

Detailed explanation of MySQL 8.0 atomic DDL syntax

Table of contents 01 Introduction to Atomic DDL 0...

Comparison of several examples of insertion efficiency in Mysql

Preface Recently, due to work needs, I need to in...

Summary of the differences between global objects in nodejs and browsers

In Node.js, a .js file is a complete scope (modul...

Alibaba Cloud Server Domain Name Resolution Steps (Tutorial for Beginners)

For novices who have just started to build a webs...

Detailed explanation on how to install MySQL database on Alibaba Cloud Server

Preface Since I needed to install Zookeeper durin...

Detailed explanation of the underlying encapsulation of Java connection to MySQL

This article shares the Java connection MySQL und...

React sample code to implement automatic browser refresh

Table of contents What is front-end routing? How ...

Detailed explanation of how to quickly build a blog website using Docker

Table of contents 1. Preparation 2. Deployment Pr...

Docker removes abnormal container operations

This rookie encountered such a problem when he ju...

Examples of importing and exporting MySQL table data

This article describes the import and export oper...