MySQL Change password

Source: Internet
Author: User

1. Mysql>access denied for user ' root ' @ ' localhost ' (using Password:yes) appears
Or mysql>access denied for user ' root ' @ ' localhost ' (using Password:no)
Both of these phenomena (1045 errors)

Check to see if the MySQL service can be turned on to ensure that the MySQL service is up and running.

Step one: Unzip your MySQL to the C packing directory
The second step: after extracting into the directory, find the Install.bat file, open with Ediplus, find--install MySQL and net start MySQL, two MySQL must be the same
Step three: Enter the cmd command (without configuring the environment variable to manually switch to the Mysql\bin directory under the CD command entry)
Fourth step: Log in to MySQL (mysql-localhost-u root) without setting the MySQL password at this time
Fifth step: Select MySQL library after successful login
Mysql>use MySQL; #选择mysql数据库
Mysql>update user SET Password=password (' NewPassword ') where user= ' root ';
Myqsl> Prompt Success
Mysql>flush privileges;
Mysql> Prompt Success
Mysql>quit (launched)


New Login MySQL
Mysql>mysql-h localhost-u root-p (need to enter password)
mysql> Prompt to enter password (' root ')
Enter Password to modify success

MySQL Change password

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.