MySQL Forums
Forum List  »  Newbie

Re: Brand new install of 5.7.10 on Mac OS X - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Posted by: Antonio De Marchi
Date: December 15, 2015 09:50AM

Had the same problem with 5.7.9 and took me a long time to figure out the correct procedure to reset the 'root' password. Follow these instructions (taken with some minor corrections) from http://www.artfulsoftware.com/infotree/tip.php?id=784. Thanks to the author of artfulsoftware.com for this


1. In a terminal window stop MySQL (or use control panel)

sudo /usr/local/mysql/support-files/mysql.server stop

2. Start the MySQL without privilege tables

sudo mysqld_safe --skip-grant-tables

3. IN ANOTHER COMMAND WINDOW start the mysql client

mysql

4. Find name of admin user (probably 'root'), update the password:

select user,host,authentication_string from mysql.user;

5. reset authentication_string; for admin user 'root' (or whatever the name is). Note: you cannot create users when running with skip-grant-tables)

update mysql.user 
set authentication_string=PASSWORD('new_pass') where user='root';
flush privileges;
exit;

6. Stop mysqld, in another command window

mysqladmin shutdown

7. Restart MySQL:

sudo /usr/local/mysql/support-files/mysql.server start

Options: ReplyQuote


Subject
Written By
Posted
Re: Brand new install of 5.7.10 on Mac OS X - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
December 15, 2015 09:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.