MySQL5.1 solution for forgetting the root password (for test), mysql5.1root

Source: Internet
Author: User

MySQL5.1 solution for forgetting the root password (for test), mysql5.1root

Many methods have been searched on the Internet, which are complex and highly repetitive. However, selecting one option does not work. Here, we will simply post a closed test.

Read more: How to reset the password of the root user who forgets the mysql database [graphic]

After reference, I used the following methods:

# Net stop MySQL in win cmd stop MySQL service (the service name may be different)> net stop MySQL # MySQL provides command line parameters for skipping access control, run the following command on the command line to start the MySQL server: # safe_mysqld-skip-grant-tables &> mysqld-skip-grant-tables # To skip MySQL access control, anyone can log on to the MySQL DATA # database as an administrator on the console. # Note that after the password is changed, the MySQL server must be stopped and restarted to take effect. Find mysql first. server and then stop mysql service # mysqld_safe-skip-grant-tables-skip-networking & # mysql> use mysql;> update user set password = PASSWORD ("new-password ") where user = "root";> flush privileges; # restart MySQL in task manager. You can log on to mysql with a new password.

The above method is safe and can be used by anyone who needs it. For more information about mysql5.1 forgetting the root password, I hope this article will help you.

Articles you may be interested in:
  • Compile MYSQL5.1.48 in VS2008
  • Configuration method of Apache2.2.16 + PHP5.3.3 + MySQL5.1.49
  • Detailed tutorial on IIS + FastCGI + PHP5.3 + MySQL5.1 + Gzip Configuration
  • How to solve the problem that mysql forgets the root password in windows
  • How to view or modify the Root password of Mysql)
  • MySQL-four methods for modifying the root password (take windows as an example)
  • How to change the default mysql null password (root password) in xampp
  • How to solve the Relay log read failure error in MySQL5.1 master-slave Synchronization

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.