How to fix Tasmota MQT: Connect failed to …, rc 5

Problem:

On the Tasmota console, you see an error message like

17:56:11.326 MQT: Connect failed to 10.19.50.10:1883, rc 5. Retry in 50 sec

Solution:

Your MQTT username/password is wrong. Check if they match what you have configured in your server in the Tasmota MQTT configuration page.