Username & Password with MQTT

Total noob to all of this. After a month of neurotic obsession I’ve managed to learn (frequently with a lot of frustration) how to get a rasp pi up and running with MQTT. Recently I had openhab communicating perfectly with arduino publishing temperature and humidity as well as publishing to an ESP8266.
Then I started to attempt to put security into the system with a user/password combination via “mosquitto_passwd -c /etc/mosquitto/passwd”. Now openhab is not either receiving or publishing messages to the listed topic. I have been using {mqtt="<[broker:openhab/climate/temperature:state:default]"} to receive messages and {mqtt=">[broker:openhab/esp1/led:command:ON:1],>[broker:openhab/esp1/led:command:OFF:0],<[broker:openhab/esp1/led/state:state:default"} to send messages. Using MQTT.fx with everything publishing fine, it’s just not being picked up by openhab.
I am assuming that I have to put the allocated username/password combination into both of those statements, yet try as I might I can not find any info on how to do it. I have tried numerous guesses/hacks but nothing has worked yet.
Can someone put me out of my misery and point me in the right direction on how to do this???

Yes, into the mqtt section of your openhab.cfg.

Thanks sihui, back on track (with less head banging).
I did look at the github MQTT bindings and assumed that with OH2 there was no openhab.cfg file and that all of those configurations were for OH1.
Had a hunt around and found /etc/openhab2/services/mqtt.cfg. With a little trial and error finally came up with the right syntax and now everything is AOK.

Next time please set the openhab2 tag or mention that you are using openHAB2, then it’s easier to help :vulcan: