π Affiliated Columns:[Program Error Solution (Recommended)]
π Writer:I'm a dog in the dead of night.
π Personal Profile: a CV engineer who is trying to learn technology, focusing on basic and practical sharing , welcome to consult!
π Welcome: this is CSDN, the place where I summarize my knowledge, please triple link if you like, and private message if you have any questions π π π π π
Your likes, followers, favorites, and comments are the biggest incentive and support for me!!!! π€© π€© π€© π€©
Article Catalog
- preamble
- I configuration: system 64 bit win10, MySQL8.0.16
- II. Analysis of causes
- III. Solutions
- 1. Program I
- 2. Option II
- IV. Summary
preamble
ββIn the process of learning the database, there are always some strange problems, such as the first two days with a good day, the day a use of the crash, really was crashed in a face of confusion. Can only go to Baidu to search for solutions, Baidu a few days, found that many methods are not very applicable, some can only be used half, so sex himself on the summary of those who are useful, the former planted a tree after the cooler Well, once in a while when the former is also good π π π π.
ββI just hope to reduce the time for people to search, comparatively time is money π π π. If there's anything in the article that needs to be improved please don't hesitate to tell me. π π π π.By the way, the other day I found a giant AI learning website that is easy to understand and funny, I can't help but share it with you.Click to go to websiteγ
I configuration: system 64 bit win10, MySQL8.0.16
ββ incorrect οΌERROR 1045 (28000): Access denied for user βrootβ@βlocalhostβ (using password: YES)
II. Analysis of causes
ββFrom the meaning of the English passage above, it can be analyzed like this:
- First: Access denied;
- Second: using password: NO/YES. here the using password is whether the password is entered or not, if it is entered, it means YES, if not, it outputs NO.
ββAccording to a lot of information on the Internet, there are the following possible reasons for the appearance of Access denied:
- MySQL's server is down.
- The user's port number or IP causes access to be denied
- MySQL configuration file errors (etc. files)
- Wrong password for root user
III. Solutions
-
Step 1 : Restart the MySQL server:net start mysql
-
Step 2 : If the user's port number is the same as the
IPοΌ3306/3307οΌ
Inconsistency, openThe file is edited. Replace all edits with:port=X
-
Step 3 : If the file is misconfigured, you can refer to the following article, which has made a change to the
The document is explained and annotated.Link to article.
-
Step 4 Here are two solutions if your password is wrong.
1. Program I
ββ The first one: hit the path where you installed MySQL beforedata
file. Then use Notepad to open the file that starts with.err
for files with a suffix.
ββhere areerr
The file will keep the passwords that were saved when the database was created, but of course sometimes the passwords are overwritten due to cache refresh issues.
ββNote: Just log in again after you know the password. If you can't find the password in the err file or still have a login error, try the second method.
2. Option II
ββThe second one: with--init-file
The parameter loads and runs the command file to change the password when the service starts. Once the command is executed, the password is cleared or reset after the service starts, and you can log in with an empty password or a specified password after starting the service.
-
Step 1 : Shut down the server first:
-
Step 2 : Create a
txt
text file namedmysqlc
, then write a command in text to change the password. I created this in the directory where MySQL is installed. - Step 3 : Starts the server from the command line, specifying that the password change command file described above is executed at startup.
mysqld --init-file=Q:\MySQL\mysql-8.0.16-winx64\ --console
ββNote: Make sure that the Mysql service is shut down before executing Step 3.
-
Step 4 : Then restart the server:
-
Step 5 : Then just enter it with the password you just changed.
ββThe above I used to solve the problem, I hope to help you, thank you for watching.
IV. Summary
ββThanks for watching and if it helped, please like and favorite the article so more people can see it. πΉ πΉ πΉ πΉ πΉ πΉ
ββYou are also welcome, to follow me. π π π
ββThe original is not easy, but also hope that you big brother support, your likes, favorites and comments are really important to me!!!! π π π π Finally, this article still has a lot of shortcomings, welcome you to seriously read the article partners feel free to private communication, criticism and correction! See you in the next issue. π
More columns to subscribe to.
- π LeetCode problem solving (continuously updating)
- πΌ [Hongmeng System]
- π [Python Scripting Notes]
- π [Java Web Project Build Process]
- π [micro letter small program development tutorial]
- β½ [JavaScript Random Notes
- π€© [Big Data Study Notes (Huawei Cloud)]
- π¦ [Program Error Solution (Recommended)]
- π [Software Installation Tutorial]
Subscribe for more and you'll see more quality content!