MySQL 8.0.19 supports locking an account after entering an incorrect password three times (example)

MySQL 8.0.19 supports locking an account after entering an incorrect password three times (example)

MySQL 8.0.19 supports locking the account after entering the wrong password three times

example:

>CREATE USER 'hechunyang'@'localhost' IDENTIFIED BY '123456' FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 3;

FAILED_LOGIN_ATTEMPTS: represents the number of failed attempts

PASSWORD_LOCK_TIME: represents the lock time, in days. Here it is locked for 3 days.

If UNBOUNDED is set, it means the lock is permanent until manually unlocked.

If you intentionally enter the wrong password more than 3 times, your account will be locked as shown below:

# mysql -hlocalhost -uhechunyang -p123456789 -S /tmp/mysql_hcy.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 3955 (HY000): Access denied for user 'hechunyang'@'localhost'.
Account is blocked for 3 day(s) (3 day(s) remaining) due to 3 consecutive failed logins.

ps: Let's take a look at the mysql 8.0.19 update unable to log in problem

cd /usr/local//mysql/bin
mysqld --initialize --console

Don't panic when reporting errors

/usr/local/var/mysql 刪除里面的文件

Initial setup here

mysqld --initialize --console

You will get a temporary password

mysql -uroot -p Change password after login

alter user 'root'@'localhost' identified by '123456';

Summarize

The above is the editor's introduction to the MySQL 8.0.19 support for locking the account after entering the wrong password three times. 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. 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:
  • Will Update in a Mysql transaction lock the table?
  • Analysis of the locking mechanism of MySQL database
  • Detailed explanation of mysql deadlock checking and deadlock removal examples
  • The normal method of MySQL deadlock check processing
  • How to query whether the mysql table is locked
  • Determine whether MySQL update will lock the table through examples
  • Pessimistic locking and optimistic locking in MySQL
  • Detailed explanation of the meaning and difference between MySQL row locks and table locks
  • Understanding and application analysis of mysql pessimistic locking and optimistic locking
  • Summary of MySQL lock related knowledge

<<:  Detailed explanation of Docker cross-host container communication overlay implementation process

>>:  An article teaches you how to use js to achieve the barrage effect

Recommend

Nginx configures the same domain name to support both http and https access

Nginx is configured with the same domain name, wh...

Docker image management common operation code examples

Mirroring is also one of the core components of D...

Vue Beginner's Guide: Environment Building and Getting Started

Table of contents Initial Vue Building a Vue deve...

HTML+CSS to achieve simple navigation bar function

Without further ado, I'll go straight to the ...

Nginx request limit configuration method

Nginx is a powerful, high-performance web and rev...

How to configure the pdflatex environment in docker

Technical Background Latex is an indispensable to...

Detailed explanation of the construction and use of docker private warehouse

1. Download the repository image docker pull regi...

Detailed tutorial on installing mysql under Linux

1. Shut down the mysql service # service mysqld s...

Detailed examples of replace and replace into in MySQL into_Mysql

MySQL replace and replace into are both frequentl...

How to process blob data in MySQL

The specific code is as follows: package epoint.m...

This article will show you what Vite does to the browser's request

Table of contents Working principle: What does th...

Method of using MySQL system database for performance load diagnosis

A master once said that you should know the datab...