Home > Database > Mysql Tutorial > MYSQL5.7.17 under MAC cannot connect and prompts incorrect password. Solution steps

MYSQL5.7.17 under MAC cannot connect and prompts incorrect password. Solution steps

PHPz
Release: 2017-04-03 17:25:28
Original
1611 people have browsed it

The problem of MYSQL5.7.17 under MAC cannot be connected. After downloading and installing SQLBench_community 6.3.9, the new MYSQL CONNECTIONS cannot be connected at all. The prompt is that the password is wrong. What is the reason and how to solve it? Today, the editor will answer the

problem that MYSQL5.7.17 under MAC cannot be connected. After downloading and installing SQLBench_community 6.3.9, the new MYSQL CONNECTIONS cannot be connected at all, and the prompt is that the password is wrong.

The specific performance is: Access denied for user 'root'@'localhost' (using password: YES)

Step1:

Apple-> ;System Preferences->Click MySQL at the bottom and close the mysql service in the pop-up page (click stop mysql server);

Step2:

Enter the terminal and enter: cd /usr/local/mysql/bin/

Press Enter to log in with administrator rights sudo su

Enter the following command after Enter to disable the mysql verification function./mysqld_safe --skip-grant- tables &

After pressing Enter, mysql will automatically restart (the status of mysql in the preferences will change to running)

Step3:

Enter the command. /mysql

After pressing Enter, enter the command FLUSH PRIVILEGES;

After pressing Enter, enter the command SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your new password');

At this point, the password modification is completed and you can log in successfully.

The above is the detailed content of MYSQL5.7.17 under MAC cannot connect and prompts incorrect password. Solution steps. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
mac
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template