Solution to MySQL error code 1862 your password has expired

Solution to MySQL error code 1862 your password has expired

The blogger hasn't used MySQL for a month or two and encountered this problem today. My solution is this, you can also refer to the following.

1. Win+R, enter services.msc in the run window to open the service, and close the MySQL57 service (57 is the version number of my MySQL Server)

2. Right-click properties, and then you need to enter a similar command in cmd

During the operation, enter cmd, cd C:/Appserv/MySQL//bin and press Enter to enter the bin directory, then mysqld --defaults-file="C:/Appserv/MySQL/my.ini" --skip-grant-tables. This command cancels the use of password login

3. Press win+R, enter cmd, then mysql -uroot -p. If Enter password: appears, just press Enter to enter.

4. Enter flush privileges; then you can add a password for the root username.

What I do is change the password directly in Navicat Premium.

What you do is to enter and set the root user password and enter the following command

use mysql
set password = password('You want to set a new password');

5. Finally, you use mysql -uroot -p in cmd state (your new password will definitely allow you to enter)

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:
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • How to solve mysql error 10061
  • MySql inserts data successfully but reports [Err] 1055 error solution
  • How to solve the abnormal error ERROR: 2002 in mysql
  • Solution to 1045 error when navicat connects to mysql
  • How to solve the error 1093-You can't specify target table for update in FROM clause in MySQL
  • Solution to the MySQL error "Every derived table must have its own alias"

<<:  How to use mqtt in uniapp project

>>:  Analysis of the implementation process of Nginx high availability solution in production environment

Recommend

Detailed explanation of sql_mode mode example in MySQL

This article describes the sql_mode mode in MySQL...

Understanding of the synchronous or asynchronous problem of setState in React

Table of contents 1. Is setState synchronous? asy...

Docker installation and configuration image acceleration implementation

Table of contents Docker version Install Docker E...

IE8 Developer Tools Menu Explanation

<br />This article has briefly explained the...

Pull-down refresh and pull-up loading components based on Vue encapsulation

Based on Vue and native javascript encapsulation,...

The use and methods of async and await in JavaScript

async function and await keyword in JS function h...

The Complete Guide to Grid Layout in CSS

Grid is a two-dimensional grid layout system. Wit...

In-depth explanation of Set and WeakSet collections in ES6

Table of contents Set is a special collection who...

JS Asynchronous Stack Tracing: Why await is better than Promise

Overview The fundamental difference between async...

A brief discussion on order reconstruction: MySQL sharding

Table of contents 1. Objectives 2. Environmental ...

Summary of Several Methods for Implementing Vertical Centering with CSS

In the front-end layout process, it is relatively...

Detailed analysis of the MySQL slow log opening method and storage format

In development projects, we can monitor SQL with ...

Detailed tutorial on installing harbor private warehouse using docker compose

Overview What is harbor? The English word means: ...

Basic usage of exists, in and any in MySQL

【1】exists Use a loop to query the external table ...