Problem description: The following error message appears when executing a command using mysqladmin.exe: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' Workaround As follows, reset the mysql root user password # service mysqld stop # Enter the mysql installation directory/bin directory (if no relevant environment variables are configured, the following operations are all performed after entering this directory), and perform the following operations# mysqld_safe --skip-grant-tables # Start mysql Create a new console and execute the following command # mysql -uroot -p Press Enter to enter the mysql console> use mysql; > update user set password=password("123456") where user="root"; #Change the root password to 123456 > flush privileges; > quit # service mysqld restart # mysql -uroot –p123456 #Login Appendix: Linux xampp integrated environment mysql root password reset method 1. Stop the MySQL server 2. Start mysqld with the `--skip-grant-tables' parameter 3. Create a new shell terminal and execute the following command sudo /opt/lampp/bin/mysql –uroot # After the command is executed, it will directly enter the mysql command console 4. Connect to MySQL permission database 5. Change the root user password update user set password=password("123456") where user="root"; Note: Here 123456 is the new password to be set for the root user 6. Refresh the permission table 7. Exit mysql 8. Restart mysql service 9. Restart XAMPP Summarize The above is the solution to the problem of resetting the Mysql root user account password 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 your questions in time. You may also be interested in:
|
<<: Detailed explanation of psql database backup and recovery in docker
>>: Detailed explanation of fs module and Path module methods in Node.js
<br />Original source: http://www.a-xuan.cn/...
Preface 1. Debounce: After a high-frequency event...
Preface As we all know, the browser's homolog...
1. Find mysqldump.exe in the MySQL installation p...
Table of contents Preface: What is waterfall layo...
Here is the mysql driver mysql.data.dll Notice: T...
For various reasons, sometimes you need to modify...
Recently, when using select query in a project, I...
Copy the certificate and key on the web scp -rp -...
Click here to return to the 123WORDPRESS.COM HTML ...
In some interview experiences, you can often see ...
Table of contents 1. First, let’s explain what Re...
This article shares with you a uniform motion imp...
Login + sessionStorage Effect display After a suc...
How to change the image hyperlink when the mouse p...