Divya, when you apply this command, it requires a tabadmin config (I think), but definitely a tabadmin restart. Try this.
did you installed necessary db drivers in tableau. sometimes port also getting issue.
apart from what sankar has mentioned you need to even check whether the user you are using to login into postgresql has sufficient permissions to login. with out permissions you may not login into the database.
Thank You everyone for replying.
I have tableau config and tabadmin restart as well. But no luck.
I have necessary db drivers installed for tableau.
I am facing this issue when trying to login with user : 'tblwgadmin'. There is no error when connecting with normal user 'tableau' by enabling the external access.
The 'tblwgadmin' user is not meant to be accessible by normal means. As of Tableau Server 8.2.5, official support for a readonly user with access to all the tables was released. See Enabling External Access to the Tableau Server Database product help article for more information.
Hope this helps!