I installed the MySQL database in Linux and set all the passwords by executing the “sudo mysql_secure_installation”. But when I am able to try to log in with SQL Workbench then got the following error:
Error 1698 (28000): Access denied for user 'root'@'localhost'
- Login first with MySQL Command shell.
sudo mysql -u root -p
2. Change the password as strong:
ALTER USER 'root'@'localhost' Identified by 'new-password';
3. Execute the flush privileges:
4. Then try to open SQL Workbench with the new password, it’s working for me.