I know this question was asked a lot before but I tried some of the solutions which were given and nothing worked..
I have downloaded MySQL Workbench 6.1 on
Just in case anyone needs this. For me in my case, I had installed a new installation of MYSQL(8) and WORKBENCH etc. so that I could then work on an old Wordpress website. No matter what I did, it wouldn't work. Kept getting "ERROR ESTABLISHING CONNECTION" etc. Thinking that it was maybe something to do with wordpress(since it is old), i tried a basic manual connection with php and nothing.
Eventually, I figured out that I had to downgrade MYSLQ. So i went back to MYSQL installer, found the server, and downgraded MYSQL from 8.0 back to 5.5
As soon as I did that, everything worked. Hope this helps