Hi, your post is a little unclear but at a guess you cannot connect to mosquito MQTT version 2 right?
Search the forum and search the internet mosquito version 2 is secure by default, so you need to modify the config file to permit connection other than localhost.
Example: Setting up a Live/Prod and a Development System - #20 by Colin