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
What does linux cd mean? In Linux, cd means chang...
1. Introduction to inode To understand inode, we ...
Table of contents Project Background Improvement ...
A few days ago, I introduced to you a domestic xh...
Table of contents Preface What are enums in TypeS...
Table of contents The role of foreign keys mysql ...
Since myeclipse2017 and idea2017 are installed on...
Table of contents 1. Simple mounting of persisten...
Table of contents Overview Form validation withou...
Since I have parsed HTML before, I want to use Vu...
1. Introduction to Docker 1.1 Virtualization 1.1....
First, check whether the hard disk device has a d...
Table of contents Question: 1. First attempt 2. R...
Online Preview https://jsrun.pro/AafKp/ First loo...
The docker exec command can execute commands in a...