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 role of the new operator in Js

Preface Js is the most commonly used code manipul...

A brief discussion on the understanding of TypeScript index signatures

Table of contents 1. What is an index signature? ...

Two ways to build Docker images

Table of contents Update the image from an existi...

Html/Css (the first must-read guide for beginners)

1. Understanding the meaning of web standards-Why...

How to install Oracle_11g using Docker

Install Oracle_11g with Docker 1. Pull the oracle...

Detailed explanation of software configuration using docker-compose in linux

Preface This article will share some docker-compo...

How to modify the sources.list of Ubuntu 18.04 to Alibaba or Tsinghua mirror

1. Backup source list The default source of Ubunt...

mysql5.7.18.zip Installation-free version configuration tutorial (windows)

This is the installation tutorial of mysql5.7.18....

MySQL prepare principle detailed explanation

Benefits of Prepare The reason why Prepare SQL is...

How to use a game controller in CocosCreator

Table of contents 1. Scene layout 2. Add a handle...

How to configure whitelist access in mysql

Steps to configure whitelist access in mysql 1. L...

A brief discussion on the design of Tomcat multi-layer container

Table of contents Container Hierarchy The process...

CSS style reset and clear (to make different browsers display the same effect)

In order to make the page display consistent betwe...

Solutions to the Problem of Creating XHTML and CSS Web Pages

The solutions to the problems encountered during x...

The current better way to make select list all options when selected/focused

During development, I encountered such a requireme...