MySql5.7.11 for Windows installation (ii)

Source: Internet
Author: User
Tags administrator password

Original: MySql5.7.11 for Windows installation (ii)

    • After installation, first create the Data folder (the old version would have been), the administrator open CMD,CD to the Bin folder, enter
      The Mysqld–initialize-insecure–user=mysql,data folder is happily generated.

    • After the installation after exiting, log in again, when you encounter the password to enter, there will be an error
      This is equivalent to forgetting the root password

      -Shut down service net stop MySQL

      • We add a line of code to the My.ini and add it under [mysqld]:
        Skip-grant-tables
        The Grant-tables, authorization form is not started when MySQL is started. This way we can skip the steps to enter the password, which can also be used when we forget the administrator password.
    • Change Password

      • Start the service
      • Input MySQL has skipped password input at this time
      • Enter use MySQL, and then enter:
        Update Mysql.user set Authentication_string=password (' 123 ') where user= ' root ' and Host = ' localhost ';
        Note: The new version of the MySQL database in the user table has no password field, so it can not be modified by the original way to modify the password!!!

      • Then enter the flush privileges;

      • then quit;
      • Turn off the service and put the comments out of the My.ini skip-grant-tables
    • Test
      • Open service
      • Input Mysql-u Root-p
      • Enter password
      • Success

MySql5.7.11 for Windows installation (ii)

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.