MySQL forgot password, how to do?
We often need to modify the MySQL password, such as a long time to forget the MySQL password, or the use of a computer someone else used, do not know the previous password, and want to use MySQL, how to do?
Preparatory work:
Locate the MySQL installation path (method below)
650) this.width=650; "title=" clip_image002.jpg "alt=" wkiol1qsnwwy_7mzaacexrvkciw911.jpg "src=" http://s3.51cto.com/ Wyfs02/m00/49/4d/wkiol1qsnwwy_7mzaacexrvkciw911.jpg "/>
650) this.width=650; "Title=" 9[@x~vn1aofub0 (F ' b[2v$8.jpg "alt=" wkiol1qsnx-buttgaagn6vbgq00856.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/49/4d/wkiol1qsnx-buttgaagn6vbgq00856.jpg "/>
The preparation is done.
1, close the running MySQL.
2, in the DOS window, go to the MySQL installation directory below.
650) this.width=650; "title=" gnfx~2%33c) n{_jg~2{a]oh.png "alt=" wkiom1qsnzuxe5g0aafuxdrfkqk928.jpg "src="/http S3.51cto.com/wyfs02/m01/49/4b/wkiom1qsnzuxe5g0aafuxdrfkqk928.jpg "/>
3, enter Mysqld–skip-grant-tables carriage return. If the message doesn't appear, it's right.
4, open a DOS window, follow the way, find the MySQL installation directory, enter the MySQL return, if successful, will appear mysql>
650) this.width=650; "title=" R $ $PDX $_cr) @FG3 ' t4}2@%2.png ' alt= ' wkiom1qsnayxo0lpaaillevyi_u334.jpg ' src= '/http S3.51cto.com/wyfs02/m01/49/4b/wkiom1qsnayxo0lpaaillevyi_u334.jpg "/>
5, connect permissions database use MySQL;
6, Change Password:
Update user set password= "1234" where user= "root"; (don't forget the last semicolon.) ) 1234 for the newly set password
650) this.width=650; "title=" B2f2~${h44]n0h4s ' od%p4a.jpg "alt=" wkiol1qsndwrm3ihaabpuie5see234.jpg "src=" http:/ S3.51cto.com/wyfs02/m02/49/4d/wkiol1qsndwrm3ihaabpuie5see234.jpg "/>
7, Refresh permissions > Flush privileges;
8, Exit > \q
9, re-open MySQL, using the user name root, password 1234 can log in.
MySQL forgot password, how to do?