Mqtt_server

I am having an issue with connection through MQTT in NODE MCU. I have added the added the following things as follows, please can anyone guide me where am I wrong?
const char* ssid = " "; // SSID
const char* password = “monster45” //WiFi Password;
const char* mqtt_server = “192.168.xxx.xxx”; // hassio or home assistant server
const char* username = “Benten”; // user name of home assistant
const char* passWord = “homeassist”; // mqtt password

I added mqtt in config.yaml in home assistant as under,
mqtt:
passWord: homeassist

I am getting the connection error i.e rc=5. i have checked all my credentials but it still appears other than this at times it gets resolved and I get the error message of rc= -2.
I dont know what to do. am stuck since hours. am a newbie.