Home > database >  MAC the mysql password reset
MAC the mysql password reset

Time:09-23

To do the graduation design, open the mysql found forgot password well
For more than an hour to understand, in case to forget again, first recorded (????????? )
# # MAC mysql password reset
1. Open the system preferences, find and open the mysql
2. As shown in figure 2, close the service
3. To make it show figure three state
4. Open a terminal
1) type CD/usr/local/mysql/bin/enter
2) enter sudo su enter enter login computer password
3) state into sh - 3.2 #
4) enter./mysqld_safe - skip - gtant - tables & amp; Enter
At this point to check the system preferences - & gt; We will find that the MySQL restart MySQL, if found not start, please try again a few times,
5. The input as shown in figure 5
6. To open a terminal, again into the state of sh - 3.2
1) input./mysql enter
2) input flush privileges; Enter
3) change the password and then input statement
The alter user 'root' @ 'localhost' identified by '0000';
0000 is my reset password
Long lesson don't get myself to remember password to get at least one I can find out the password
7. Restart your computer
(????????? )
Continue to learn!

  • Related