Several methods to crack the root password of mysql _ MySQL

Source: Internet
Author: User
Several methods to crack the mysql root password:
Method 1

Use phpmyadmin, which is the simplest. modify the user table of the mysql database, but do not forget to use the PASSWORD function.

Method 2

Use mysqladmin, which is a special case stated above.

Mysqladmin-u root-p password mypasswd

After entering this command, you need to enter the original root password, and then the root password will be changed to mypasswd.

Change the root in the command to your username, and you can change your password.

Of course, if your mysqladmin cannot connect to mysql server, or you cannot execute mysqladmin, this method is invalid, and mysqladmin cannot clear the password.

The following methods are used at the mysql prompt and must have the root permission of mysql:

Method 3

Mysql> Insert INTO mysql. user (Host, User, Password)

VALUES ('%', 'Jeffrey ', PASSWORD ('biscuit '));

Mysql> FLUSH PRIVILEGES

Specifically, this is adding a user with the username jeffrey and password biscuit.

This example is provided in mysql Chinese Reference Manual:

Be sure to use the PASSWORD function, and then use flush privileges.

Method 4

Similar to method Sany, but the REPLACE statement is used.

Mysql> replace into mysql. user (Host, User, Password)

VALUES ('%', 'Jeffrey ', PASSWORD ('biscuit '));

Mysql> FLUSH PRIVILEGES

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.