I am using mysql.connector package. I want to make sure it is possible to remotely connect to a database from any IP (especially from computers that MySql is not installed in) via basic authentication (username and password), using the follwoing line:
con = mdb.connect(host=self.ip.text, user='username', passwd='pass', db='dbname')
Can somebody please confirm it can be done? Are there any other parameters that can affect? (Like operation system etc.)
You can connect to a database from any IP (aside from cases related with network limitation e.x. security issues).
These parameters which You use are enough. Check IP adress variable is use correctly.
If no exception occurred You should connect successfully.