First, start MySQL in skip-grant-tables mode: From now on, you will step into the first pit, if you use the wrong modification method posted everywhere on the Internet: mysql> UPDATE mysql.user SET authentication_string=PASSWORD('your_new_password') WHERE User='root'; (Note that after 5.7, password is changed to authentication_string) Congratulations, you have successfully modified it, but you will find that when you use a GUI tool such as navicat to connect, the following error will be reported: ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. At the same time, you will find that the command line can use The following command will save you: mysql> SET PASSWORD = PASSWORD('your_new_password'); After execution, shut down mysqld using the command Start mysql again with mysql.server start and everything will be ok~ The above is the method I introduced to you to change the root password of Mysql5.7.10 version under MAC. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of vite+ts to quickly build vue3 projects and introduce related features
>>: Detailed explanation of mktemp, a basic Linux command
Table of contents MySQL inner join, left join, ri...
Anyone who has used the Linux system should know ...
A reader contacted me and asked why there were pr...
Locks in MySQL Locks are a means to resolve resou...
Table of contents View network configuration View...
Table of contents Select Structure Loop Structure...
The main text page of TW used to have a width of 8...
filter is generally used to filter certain values...
<br />The frame structure allows several web...
The Flexbox layout module aims to provide a more ...
1. Check the software installation path: There is...
Table of contents Usage scenarios How to achieve ...
Table of contents What is JSI What is different a...
1. Introduction ● Random writing will cause the h...
Table of contents Problem Description Method 1 (b...