Mac first install MySQL 5.7.12 do not know the root password solution

Source: Internet
Author: User

For 2 nights, this has to be a record.

1. First stop MySQL from System Preferences

2. Open the Mac command-line tool, sudo su runs the command as an administrator

3. Cd/usr/local/mysql/bin (MySQL installation directory)

4../mysqld_safe --skip-grant-tables &

5. Mysql-p

mysql>  update mysql. 6 user . set authentication_string= password ( ‘123qwe‘ where user = ‘root‘ andHost = ‘localhost‘;

7.flush privileges;

After all the above steps and then from the Workbench Basic 2 times the password can be connected

The 5th step is very important, because many people on the net to write the 5th step is to reset the password through workbench, I myself try to invalid, do not know whether the version of the problem

Mac first install MySQL 5.7.12 do not know the root password solution

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.