foreword
Blogger's Personal Community: Development and Algorithm Learning Community
Blogger Profile: Killing Vibe's Blog
Everyone is welcome to join and exchange and learn together~~
1. Open MySQL (if you can open it, please skip this step)
The first one: After installing MySQL, MySQL provides your client program
The second method: log in through the command line, win+R
Note : In the second method, if the command line shows that mysql cannot be found, it is because there is no environment variable configured . We can find it in the bin directory under the MySQL installation path. By default, it is in the path shown in the figure:
Just modify the environment variables, if not, you can read the blogger's previous article:
Set environment variable graphics
As follows:
2. Password-free login (you can start from this step if you forget the password)
1. Find the configuration file of mysql
Note: If you can't find it, check the hidden items, because the ProgramData folder is hidden by default
2. Open the my.ini file
3. Find the place shown in the figure and enter skip-grant-tables
4. Go down and find this place and enter utf8mb4 (remember to save and then close)
5. Close the mysql service and open it again. At this time, we can log in to mysql directly without a password
6. Just press Enter to log in
3. Change password
1. Enter the following code and press Enter
update mysql.user set authentication_string = password(‘1’) where user=‘root’;
Your password will be changed to 1~
2. If you don’t want to log in without password, you can comment out the skip-grant-tables in the my.ini file, restart the mysql service, and log in with the new password
Summarize
The above is the process of mysql password-free login and password modification. If it is helpful, don’t forget to pay attention. Bloggers continue to share dry goods with pictures and texts~~