Forgot password How to change the password

Source: Internet
Author: User

  • If you use the MySQL database to forget the account password, you can adjust the configuration file, the way to skip the password to log the database,

    In the database to modify the account password, the general default account to ask Root

    Edit MySQL configuration file my.cnf

    Note: The actual MY.CNF configuration file path is the subject of the

    Vim/etc/my.cnf

  • under [mysqld] skip-grant-tables #增加


  • Restart MySQL Service

    Subject to the actual MySQL startup script path

    /etc/init.d/mysqld restart


  • Login Database

    /usr/bin/mysql Enter the following command:

    Note: The actual MySQL execution file path is subject to

  • mysql> use MySQL;

  • mysql> UPDATE user SET Password = Password (' new password ') WHERE user = ' root ';

  • Mysql> Flush Privileges;mysql> quit


  • Delete or comment The skip-grant-tables added in the first step


  • Restart MySQL Service

    /etc/init.d/mysqld restart




  • From for notes (Wiz)

    Forgot password How to change the password

    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.