Ubuntu Modify Web Database MySQL password method and modify MySQL password under Windows

Source: Internet
Author: User
Tags web database

Ubuntu (Linux):

First, go to the command line.
Log in as root, command:

Mysql-uroot-p

Enter the password in return;
Mysql>use MySQL;

Mysql>update user SET Password=password (' Enter new password ') WHERE user= ' root ';

Mysql>flush privileges;
has been completed.

Windows:

Under the Windows command line, modify the MySQL database password step as follows:
1, through the DOS command into the MySQL bin directory;
2, input "Mysql-uroot-p", enter the MySQL command state;
3, if Root has a password, MySQL will prompt to enter the original password, and then into the MySQL command state;
4. If you change the root user password to 123456, enter it in the MySQL command state:
Update Mysql.user set Password=password (' 123456 ') where user= ' root ';
Prompt for query OK, indicating that it has been updated.
5. Enter the flush privileges; To save the changes, enter it in the MySQL command state:
FLUSH privileges; Enter
At this point, the password modification is complete.

Ubuntu Modify Web Database MySQL password method and modify MySQL password under Windows

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.