Who did the MySQL login without password?

Source: Internet
Author: User
Tags mysql login

A MySQL database server that has been running for a long time is normal. Because of corruption from the database server hardware, you need to re-import the database for synchronization. When performing the operation again, forgot to enter the option-p (mysql-u root), actually went straight in. It's not so scary.


Quickly log in to see if there is a password is empty account, did not find AH? Force the root password to be changed, then flush privilges. Try again, or you can log in without a password.


Check the options file/etc/my.cnf to see if there is a password written directly to the file, or not. Find a search again, found in the directory/root files. my.cnf, open it and look at it, the contents are:

[Client]

User=root

Password=i%^kgg76

Delete this file, then execute MySQL, hey, can't get in!


This may be someone to debug the database conveniently, hiding a file here.

This article is from the "Sery" blog, make sure to keep this source http://sery.blog.51cto.com/10037/1430978

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.