Graphic tutorial on modifying the initial password of Mysql5.7.11 in windows, and the initial password of mysql5.7.11

Source: Internet
Author: User

Graphic tutorial on modifying the initial password of Mysql5.7.11 in windows, and the initial password of mysql5.7.11

Mysl was installed last week but cannot be logged in. It took a long time for me to find the solution. Thank you for the details.

[Abstract: 1. my-default.ini rename my. ini is extracting the contents of the above re-create a my-default.ini name for my. ini. 2. Open the variable settings in Windows and create a variable named MYSQL_HOME. The variable value is MyS.]

1. my-default.ini renamed my. ini

Copy the my-default.ini under the extracted directory and rename it my. ini.

2. Open the Windows environment variable settings, create the variable name MYSQL_HOME, set the variable value to the Path of the MySQL installation directory, and add it to the Path variable of the environment variable; % MYSQL_HOME % \ bin;


3. Several commands

Install MySQL service: mysqld -- install

Start: net start MySQL

Stop: net stop MySQL

Uninstall: SC delete MySQL, mysqld-remove

The command line window must be opened in administrator mode. In % MYSQL_HOME % \ bin; directory,

A. install the service: mysqld -- install.

B. start the Service net start MySQL

(The MySQL service is starting. The MSQL service cannot be started. The Service did not report any errors. Type net helpmsg 3534 for more help.

Delete the data folder and use mysqld -- initialize to initialize the data directory. When the data cannot be deleted, open the task manager and kill the mysqld process. Use the same method when the service fails to be started or disabled .)

When the service is enabled successfully, use

Mysql-u root-p press ENTER

Enter Password

ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)

Disable the service. net stop MySQL

Open in safe mode, mysqld -- skip-grant-tables

At this time, the cursor will continue to flash. Note: open another command line window.

4. The same operation as the previous one came to the bin directory,

Log on to mysql-u root-p

Enter the password and press Enter;

You can go in.

Then

Use mysql;

(The password of the previous version may be "password" and "authentication_string" in 5.7.11. You can select * from user to view the password)

(Old Version) update user set password = password ("123456") where user = "root ";

(5.7.11) update user set authentication_string = password ("123456") where user = "root ";
Finally, flush privileges; then OK.

5. log on to the system and try again.

The startup failed. The mysqld process is still running. Just kill it.

Finally, the root password is successfully modified.

The above is a graphic tutorial on modifying the initial password of Mysql5.7.11 in windows. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.