Mac Install MySQL 5.7 After login cannot execute command "You must reset your password using ALTER USER statement before executing this statement."

Source: Internet
Author: User

Today installed on the Mac MySQL 5.7, after starting the service, enter Mysql-u root-p, enter the initial password, try to execute show databases;

reported a you must reset your password using the ALTER USER statement before executing this statement. Error.

Refer to Stack Overflow previous post https://stackoverflow.com/questions/33467337/ Reset-mysql-root-password-using-alter-user-statement-after-install-on-mac

The steps are as follows:

Set password = password (' Your new password ');

Alter user ' root ' @ ' localhost ' password expire never;

Flush privileges;

Mac Install MySQL 5.7 After login cannot execute command "You must reset your password using ALTER USER statement before executing this statement."

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.