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

Batch replace part of the data of a field in Mysql (recommended)

Batch replace part of the data of a field in MYSQ...

What is MIME TYPE? MIME-Types type collection

What is MIME TYPE? 1. First, we need to understand...

A brief discussion on the types of node.js middleware

Table of contents Overview 1. Application-level m...

How to insert Emoji expressions into MySQL

Preface Today, when I was designing a feedback fo...

Tutorial on installing mysql8 on linux centos7

1. RPM version installation Check if there are ot...

Sample code for batch deployment of Nginx with Ansible

1.1 Copy the nginx installation package and insta...

MySQL 8.0.20 installation and configuration method graphic tutorial

MySQL download and installation (version 8.0.20) ...

How to write CSS elegantly with react

Table of contents 1. Inline styles 2. Use import ...

Detailed explanation of nginx optimization in high concurrency scenarios

In daily operation and maintenance work, nginx se...

Nginx compiled nginx - add new module

1. View existing modules /usr/local/nginx/sbin/ng...

Examples of correct use of interface and type methods in TypeScript

Table of contents Preface interface type Appendix...

Detailed tutorial on installing PHP and Nginx on Centos7

As the application of centos on the server side b...

MySQL and MySQL Workbench Installation Tutorial under Ubuntu

Ubuntu install jdk: [link] Install Eclipse on Ubu...