Mysql (Linux server) root user password forgot reset method

Source: Internet
Author: User
Tags mysql login

MySQL is a very common open source database, many users, if you accidentally forgot to install the server's MySQL password, unable to log in, how should I reset it? The method is very simple, now share with you. (System environment: CentOs 6.5 software: Mysql)

1. First confirm that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily. Because the MySQL database is completely out of password-protected state during the reset of the root password of MySQL.

2. Modify the MySQL login settings:

3. Log in and modify the root password of MySQL
New-password is the new password, the password in the image is reset to "123456"

4. The modification succeeds, but do not forget to delete the new content of the configuration file, then restart MySQL, log in with the new password
VI command to remove the second step to add the content, not detailed said

Re-use password mode login

Mysql (Linux server) root user password forgot reset method

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.