I am trying to run a .sql in MySQL workbench. For this, I choose: File -> Run SQL script option and finally provided the sql file name, in my case it is: sql_script.sql
However, when I run this, I got below message:
Preparing...
Importing sql_script.sql...
Finished executing script
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
As per this error message, it seems that it is expects to pass the credentials. I am not sure how to do this if my interpretation of this error message is correct.
Any information how to past this issue?

select current_user();Then give output ofshow grants for root@localhost;(don't show the password hash here). Also show the script you are running.