- edit mysql profile: My.ini (in MySQL installation directory).
- Open the configuration file, add it to the last line of the file: Skip-grant-tables, and then save exit
- Span style= "color: #333333; font-family: "microsoft yahei", Microsoft ya Black, arial, song body, Sans-serif; Font-size:1rem; Font-style:normal; Font-weight:normal; Letter-spacing:normal; Orphans:2; text-align:justify; text-indent:0px; Text-transform:none; White-space:normal; Widows:2; word-spacing:0px; Float:none; Display:inline!important; Background-color: #ffffff "means to not start grant-tables
when starting MySQL
- restart MySQL service: (in the command-line window, you need to add the MySQL bin path to the environment variable beforehand, or by restarting it in the service)
- net stop mysql
- net start MySQL
- set a new root password
- mysql-u root-p Direct Enter, no need to enter a password to enter the database . (Or you can enter the database without a password by hitting enter directly)
- Use MySQL at the command line (switch to system database)
- execute the following statement to modify the root user password:
- update user set Password=password (" 123456 ") where user= ' root '; (MySQL5.5 version below)
- update user set authentication_string=password (' 123456 ') where user= ' root '; (MySQL5.5 higher)
<wiz_tmp_tag id= "Wiz-table-range-border" contenteditable= "false" style= "Display:none;" >
From for notes (Wiz)
MySQL changes the default root account password