MySQL root password reset

Source: Internet
Author: User
Tags mysql login

1. Win cmd under net stop MySQL stop MySQL service or Task Manager inside End Mysqld-nt.exe process or service inside end MySQL Service

>net stop MySQL

2. At the command prompt (CMD), go to the MySQL Bin directory and use the command to start MySQL and start it without checking the permissions;
#MySQL提供跳过访问控制的命令行参数, start the MySQL server with this command at the command line:
>mysqld-nt--skip-grant-tables

3. Then reopen a command Prompt window (CMD) with a blank password to log in to MySQL using the root user;

>mysql-u root

4. Change the password of the root user;

> Update mysql.user set Password=password (' New password ') where user= ' root ';

> flush Privileges;

> quit

5. Then open the MySQL login screen and log in with the root password you just set.

MySQL root password reset

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.