In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to solve the problem of resetting the password of Mysql root user account. It is very detailed and has certain reference value. Friends who are interested must read it!
Problem description:
The following error prompt occurs when executing a command using mysqladmin.exe:
Mysqladmin: connect to server at 'localhost' failed error:' Access denied for user 'root'@'localhost' (using password: YES)'
Solution method
Reset the mysql root user password as follows
# service mysqld stop# go to the mysql installation directory / bin directory (if the relevant environment variables are not configured, the following operations are done in this directory first), and execute the following operations # mysqld_safe-skip-grant-tables # start mysql
Create a new console and execute the following command
# mysql-uroot-p 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 # Log in
Attached: mysql root password reset method in linux xampp integrated environment
1. Stop the mysql server
Sudo / opt/lampp/lampp stopmysql
2. Use the `--skip-grant-tables' parameter to start mysqld
Sudo / opt/lampp/sbin/mysqld-- skip-grant-tables
3. Create a new shell terminal and execute the following command
After the sudo / opt/lampp/bin/mysql-uroot # command is executed, it will go directly to the mysql command console.
4. Connect to the mysql permission database
Use mysql
5. Modify the password of root user
Update user set password=password ("123456") where user= "root"
Note: 123456 here is the new password to be set for root users
6. Refresh the permission table
Flush privileges
7. Quit mysql
Quit
8. Restart the mysql service
Sudo / opt/lampp/lampp startmysql
9. Restart XAMPP
/ opt/lampp/./lampp restart
The above is all the contents of this article entitled "how to solve the problem of resetting Mysql root user account password". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.