Sample Header Ad - 728x90

MySQL 5.7 via brew on MacOS 12.6: how to get past "Access denied" barrier?

0 votes
2 answers
1422 views
I've been through every how-to I can find on the internet, but none are working for me. I've got a fresh install of MySQL 5.7 via homebrew. I can see that the service is running, and the mysql client is installed as well. Any attempt to get to the database via the client, like mysql -u root -p or more simply mysql -u root as the installation process suggests, asks for a password with the prompt "Enter password:". Well, I just installed the database; I have no idea what the password is. Using sudo makes no difference. I've tried solutions involving mysqladmin with essentially the same result: "Access denied for user 'root'@'localhost'". I've got a bunch of experience with Postgresql, but it's got a significantly different way of dealing with mapping platform identity to db identity apparently. How do I get this thing to work? (Note that the many answers in Ask Different are among the ones I've tried already with the exact same problem.)
Asked by Pointy (367 rep)
Oct 19, 2022, 03:01 PM
Last activity: Oct 19, 2022, 04:34 PM