Mysql 8.0 installation and password reset issues

Mysql 8.0 installation and password reset issues

Mysql 8.0 installation problems and password reset

1: Download MySql

Official website download address: https://dev.mysql.com/downloads/mysql/


Website home page drop down
Select the system, click the Download button, and save the compressed file to the installation path.

2: Install MySql

Open the downloaded file and unzip it to the specified directory.

Open the unzipped MySql file and create my.ini (mysql configuration file) in the root directory. Use nodpad++c to create

Here you need to change the basedir and datadir paths to the mysql decompression path

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[mysqld]
#Set port 3306 port = 3306
# Set the installation directory of mysql basedir=C:\Program Files\Java\mysql-8.0.12-winx64\mysql-8.0.12-winx64
# Set the storage directory of mysql database data datadir=C:\Program Files\Java\mysql-8.0.12-winx64\mysql-8.0.12-winx64\datadir
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
skip-grant-tables

Find the CMD command prompt

Enter the mysql subdirectory bin

Enter in sequence: mysqld --install (install)

mysqld --initialize (Initialization)
net start mysql (run) 

insert image description here
I have completed the installation here. This machine is Apple Windows 7 and has only one C drive, so it can only be installed in the C path.

3: Change password

Because the latest version of MySQL 8.0 is downloaded, it comes with a password and must be reset when used.


insert image description here

Use administrator privileges to enter mysql, the system requires a password.

The original password is in the .err file in C:\Program Files\Java\mysql-8.0.12-winx64\mysql-8.0.12-winx64\data.

Open .err, the password is on this line of the file.

insert image description here

Type the password into enter password in cmd.

Testing will report an error

insert image description here

Insert command to change password

alter user 'root'@'localhost' identified with mysql_native_password by 'your password';

Prompt Query OK

Test using database:

insert image description here

Note that the database statement must end with a semicolon, otherwise it will not be executed and -> will appear continuously.

Summarize

The above is the MySQL 8.0 installation and password reset issues introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time!

You may also be interested in:
  • Tutorial on installing the latest MySQL 8.0.18 using a compressed package on Win10 64-bit (with pictures and text)
  • MySQL 8.0.11 compressed version installation and configuration method graphic tutorial
  • MySQL 8.0.11 compressed version installation tutorial
  • MySQL compressed package installation and configuration method graphic tutorial
  • Complete steps to reset the root user password in mysql8
  • How to reset the root password in mysql8.0.12
  • How to reset MySQL root password under Windows
  • Detailed method for forgetting the root password or resetting the password in Mysql 5.7
  • How to reset the MySQL password after forgetting it in Mac operating system
  • What should I do if I forget my MySQL password? How to reset MySQL root password
  • Pitfalls encountered when installing MySQL 8.0.18 compressed package and resetting forgotten passwords

<<:  How to detect whether a file is damaged using Apache Tika

>>:  How to set up the terminal to run applications after Ubuntu starts

Recommend

How to install and configure MySQL and change the root password

1. Installation apt-get install mysql-server requ...

Web page html special symbols html special characters comparison table

Special symbols Named Entities Decimal encoding S...

The difference between ENTRYPOINT and CMD in Dockerfile

In the Docker system learning tutorial, we learne...

Solution to MySQL Installer is running in Community mode

Today I found this prompt when I was running and ...

Detailed installation and use tutorial of mysql 8.0.15 under windows

This article shares with you the detailed install...

Docker container data volume named mount and anonymous mount issues

Table of contents What is a container data volume...

Node.js solves the problem of Chinese garbled characters in client request data

Node.js solves the problem of Chinese garbled cha...

The three new indexes added in MySQL 8 are hidden, descending, and functions

Table of contents Hidden, descending, and functio...

Basic learning and experience sharing of MySQL transactions

A transaction is a logical group of operations. E...

Summary of the unknown usage of "!" in Linux

Preface In fact, the humble "!" has man...

MySQL 8.x msi version installation tutorial with pictures and text

1. Download MySQL Official website download addre...

VMware12.0 installation Ubuntu14.04 LTS tutorial

I have installed various images under virtual mac...

How does MySQL achieve multi-version concurrency?

Table of contents MySQL multi-version concurrency...

js implements a simple calculator

Use native js to implement a simple calculator (w...