MYSQL5 Reset Root Password

Source: Internet
Author: User
Tags mysql mysql client reset version mysql database

Operating system: DEBIAN Linux 3.1

MySQL database version: 5.0.27

(1) Login with system root Authority

(2) Stop MySQL server:
Mysql.server stop

(3) Skip authorization form to execute MySQL server:
Mysqld_safe--skip-grant-tables--skip-networking &
(Note: Parameter--skip-grant-tables is skipped authorization table;--skip-networking is not listening for TCP/IP connections)

(4) Execute MySQL client:
Mysql

(5) Use MySQL database
Use MySQL;

(6) Update the root password
Update user set Password=password (' New password ') where user= ' root ';

(7) Shut down the MySQL server and try to start with the normal side

If you are not using this version of me, you can find a suitable version of Mysqld_safe in the MySQL installation directory, followed by--skip-grant-tables to skip the authorization form, the Mysqld_safe version of my book is "Safe_ Mysqld "(actually write here I seem to think up, where I have seen said 5.0 after the sqfe_mysqld changed into a mysqld_safe, which I found on the internet for half a day)



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.