How to reset the management password of Mysql

Source: Internet
Author: User

When I use Mysql to reset the management password, I will inevitably forget the management password. How can this problem be solved?

Here we will first introduce a more common solution, including Windows and Linux operating systems: 1. stop the running Mysql process killall-TERM mysqld -------- in LINUX windows, you can stop the system service. net stop mysql or stop the process; 2. Start Mysql/usr/local/mysql/bin/mysqld_safe -- skip-grant-tables & ----- LINUX windows in safe mode: 1. Enter the installation path X: \ at the command prompt :\... \ Bin \ mysqld -- skip-grant-tables 2. Edit the configuration file in the installation path: X: \ etc \ my. add skip-grant-tables to the last line of ini, start the service www.2cto.com, enter the database, and change the management password to enter the database. The password has been restored to NULL: use mysql; -------------- select mysql database; update user set password = password ('000000') where user = 'root'; ---------- change the management password to 123 flush privileges; ------------- refresh the permission table
Author Gong qinghan

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.