Specific method: Step 1: Stop the mysql service /etc/init.d/mysqld stop Step 2: Skip password verification /usr/bin/mysqld_safe --skip-grant-tables or mysqld_safe --skip-grant-tables Start mysql by skipping the privilege tables. Step 3: Open another command prompt window use mysql;#Insert the deleted records and then change the password update user set password=password("new_pass") where user="root"; Step 4: Refresh permissions flush privileges; Content extension: Solve the problem of MySQL logging in without a password Because I executed a command to change the database root user password. After I changed it, I found that I could log in with both the new and old passwords. So I thought I could log in without entering a password and just press Enter. I did not perform password-free login in the configuration. Finally, I executed a command to solve the problem: update user set plugin = "mysql_native_password"; Changing passwords and solving password-less login problems are all in the following commands: > use mysql; > update user set authentication_string=password("your password") where user='root'; #(version without password field, that is, version <=5.7) > update user set password=password('your password') where user='root'; #(version with password field, version>5.7) > update user set plugin="mysql_native_password"; > flush privileges; > exit; Restart mysql service The above is the details of the example method of implementing MySQL login without a password. For more information on how to implement MySQL login without a password, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: js object to achieve data paging effect
>>: Modification of the default source sources.list file of ubuntu20.04 LTS system
1. Preparation 1.1 harbor download harbor downloa...
Table of contents 1. Analysis of key source code ...
Introduction The meta tag is an auxiliary tag in ...
After pressing Enter on the webpage, the form is a...
After being tortured by the front-end cross-domai...
If you need to use an image to implement the use ...
Table of contents 1. Background 2. Prerequisites ...
1. Demand The base has 300 new servers, and needs...
A hyperlink URL in Vm needs to be concatenated wit...
difficulty Two mask creation of svg graphics Firs...
Docker officially recommends that we use port map...
Preface: How to get the coordinates of the curren...
This article shares the installation and activati...
Table of contents 1. Trigger Introduction 1. What...
Detailed explanation of tinyMCE usage initializat...