Failed to connect to mysql at with user root access denied for user ‘root’@’localhost'(using password:YES)

First check if it’s a workbench or connection problem.

1) In your windows run ‘cmd’ to open a terminal

Try both

2a) mysql -u root -p -h -P 3306

2b) mysql -u root -p -h > localhost -P 3306

3) If the connection is good you will get a password prompt, see if you can connect with correct password.

If your connection is denied, just grant the permission

mysql >GRANT ALL ON [DatabaseName].* TO 'root'@'' IDENTIFIED BY '[PASSWORD]';

If your connection is accepted here, it’s like a workbench configuration problem.

Leave a Comment