In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "MySQL changes the root password after the error: access denied for user 'root'@'localhost' usi how to solve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "MySQL modified root password error: access denied for user' root'@'localhost' usi how to solve" it!
Originally, mysql ran well and changed the root password once, but it didn't seem to succeed. I didn't care about it at that time, and there was nothing wrong with mysql. The next day, the Times launched the error "access denied for user 'root'@'localhost' using password yes". There are many ways to solve the problem on the Internet, but I can't even try a few of them. Here are some of my own methods after successful practice.
The following is sorted out according to http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html" to make the solution a clearer step.
1. First of all, enter the command line mode, my mysql is installed on disk C, and change to the mysql bin directory. The format of the command is as follows.
C code www.2cto.com
Cd C:\ program files\ mysql\ mysql server 5.1\ bin
two。 Stop the mysql service and type the following command:
C code
C:\ Program Files\ MySQL\ MySQL Server 5.1\ bin > mysqld-- defaults-file= "C:\ Program
Files\ MySQL\ MySQL Server 5.1\ my.ini "--console-- skip-grant-tables
The following results show that the startup is successful.
C code
Version: '5.1.33 port port: 3306 MySQL Community Server
(GPL)
3. Open another window and change to the bin directory as well
C code
C:\ Program Files\ MySQL\ MySQL Server 5.1\ bin >-uroot mysql
The display results are as follows:
C code
Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2
Server version: 5.1.33-community-log MySQL Community Server (GPL)
Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.
4. Continue with the following step and enter:
C code www.2cto.com
# / etc/init.d/mysql stop
# mysqld_safe-user=mysql-skip-grant-tables-skip-networking &
# mysql-u root mysql
Mysql > UPDATE user SET Password=PASSWORD ('newpassword') where USER='root'
Mysql > FLUSH PRIVILEGES
Mysql > quit
# / etc/init.d/mysql restart
# mysql-uroot-p
Enter password:
Mysql >
So far, the password has been updated successfully.
Thank you for your reading, the above is the "MySQL change root password report error: access denied for user 'root'@'localhost' usi how to solve" the content, after the study of this article, I believe you MySQL change root password error report: access denied for user' root'@'localhost' usi how to solve this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
| | 0 | SELECT STATEMENT | | 107 | 2782 | 3 (34) | 00:00:01 | | 1 | PX COORDINATOR | | |
© 2024 shulou.com SLNews company. All rights reserved.