MySQL Root Password Problems

Source: Internet
Author: User

Title: Forgot MySQL password
Source: water in the Pacific Ocean
Time: Tue, 14 Mar 2006 12:59:43 + 0000
Author: water in the Pacific Ocean
Http://blog.ciyi.net/read.php? 936

Content:
If MySQL is running, first:
# Killall-term mysqld // kill the MySQL process
Start MYSQL: Bin/safe_mysqld -- skip-grant-tables &
# Mysqld_safe -- skip-grant-Table // enter MySQL without a password.
Then
# MySQL // enter the MySQL Command
> Use MySQL // MySQL table
> Update user SET Password = PASSWORD ("new_pass") where user = "root"; // The ITALIC part is the password you want.
> Flush privileges; // I don't know. It should be an update type.
Kill MySQL again and start MySql in a normal way.
I won't run it, so I will restart it. It will start automatically after it is started.
Note: many new users do not use password = PASSWORD ("..."), but directly use password = "...", so it is difficult to change the password.
Some things need to be combined with actual conditions, such as paths. I am also looking for old materials, which may be slightly different from you.
Generated by Bo-blog 2.0.1 SP1

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.