After logging into MySQL 5.6 successfully as root, it says access denied for root, ERROR 1045 (28000)

1

I recently used MacPorts to upgrade from MySQL 5.5 to 5.6. I can use my database fine on my laptop. I tried to enable remote access to the database so I could edit the database using DB clients on other computers on my network, but after I logged in as root OK, it said access denied for root:

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 31
Server version: 5.6.19 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I have tried the answer posted mysql how to fix Access denied for user 'root'@'localhost' and it does not fix the problem

gknauth

Posted 2014-09-08T13:41:04.900

Reputation: 111

1@duDE I tried the answer from the question you think this is a duplicate of, and it did not fix the problem. – gknauth – 2014-09-08T16:04:50.940

The problem is NOT that I can't login as root. I can! The problem is that AFTER logging in as root, I can't get the GRANT ALL PRIVILEGES... command to work. – gknauth – 2014-09-08T16:06:40.777

1Run mysqld with --skip-grant-tables and then login and grant yourself perms. – ssnobody – 2014-09-08T18:08:18.893

try this CREATE USER ‘username‘@’host_machine‘ IDENTIFIED BY ‘some_pass‘; GRANT ALL PRIVILEGES ON *.* TO ‘username‘@’host_machine‘WITH GRANT OPTION; CREATE USER ‘username‘@’%’ IDENTIFIED BY ‘password‘; GRANT ALL PRIVILEGES ON *.* TO ‘username‘@’%’WITH GRANT OPTION; – Renju Chandran chingath – 2014-09-14T21:04:23.800

No answers