How does mysql forget the root password?

Source: Internet
Author: User
Mysql forgot the root password solution 1. Stop mysql Service 2. Enter mysqld -- skip-grant-tables in the command line (skip permission check to start mysql Service) 3. Enter updateMySQL in the command line. usersetpasswordPASSWORD (new password) whereUserroot; flushprivileges; quit4 restart mysql Service

Mysql forgot the root password solution 1. Stop mysql Service 2. Enter mysqld -- skip-grant-tables in the command line (skip permission check to start mysql Service) 3. Enter update MySQL in the command line. user set password = PASSWORD ('new password') where User = 'root'; flush privileges; quit 4. Restart the mysql Service

How to solve the problem of forgetting the root password of mysql
1. Stop the mysql Service
2. command line Input
Mysqld -- skip-grant-tables (skip permission check to start mysql Service)


3. command line Input
Update MySQL. user set password = PASSWORD ('new password') where User = 'root'; flush privileges; quit


4. Restart the mysql service.

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.