In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article was first posted on cartoon's blog.
Please indicate the source of the reprint: https://cartoonyu.github.io/cartoon-blog
Recently started to learn MySQL, the installation is very smooth, according to the online ready-made tutorials can be successfully installed.
However, before entering
Mysql-uroot-p
When entering the password again, I encountered this situation.
Access denied for user 'root'@'localhost' (using password: YES)
Many solutions have been found online, but there is basically only one, which is added to the mysqld entry in the .ini file.
Skip-grant-tables
Then restart the server and follow the previous steps again (finally, do not enter the password), but still a statement stopped me.
Access denied for user 'root'@'localhost' (using password: NO)
Integrated a lot of methods on the Internet, one by one to try, and finally succeeded.
The overall idea is to modify the contents of the .ini configuration file, but in the form of a command line. I don't know if it is because the version iterates to shield the previous method of directly modifying the file. In any case, it is possible to modify it on MySQL 8.0 through command line modification.
Let's get started.
Open cmd as an administrator Switch to MySQL's bin directory and close the MySQL server net stop mysql to skip the steps to enter the password (note: the file name and path should match your own) mysqld-- defaults-file= "D:\ MySQL\ my.ini"-- console-- skip-grant-tables indicates success if a statement like screenshot circle appears! [] (https://cache.yisu.com/upload/information/20200310/35/73912.jpg) restart server The server net start mysql logs in to the MySQL server mysql-uroot-p and you can log in successfully after entering the password. (the number 1 looks a lot like the letter l) it's almost done at this point, but when I type show databases
The feedback from MySQL is:
You must reset your password using ALTER USER statement before executing this statement.
My guess is that MySQL believes that the random password provided during installation is not secure and allows the user to reset the password.
Looked for it on the Internet, and then found a ready-made way.
Reference article: https://dev.mysql.com/doc/ref...
Password never expires ALTER USER 'root'@'localhost' IDENTIFIED BY' new password 'PASSWORD EXPIRE NEVER; password ALTER USER' root'@'localhost' IDENTIFIED BY 'new password' PASSWORD EXPIRE
Then log in to the server again and you will be able to operate normally.
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
© 2024 shulou.com SLNews company. All rights reserved.