import mysql.connector
db = mysql.connector.connect(
host = "",
user = "username",
passwd = "password",
database = "theDatabase")
c = db.cursor()
c.execute("SELECT * FROM Test2")
print(c.fetchall())
Hi, using this piece of code I can connect to my mysql database that is another computer on the same network. But if I wanted to connect to the database from a computer that is not on the same network, how would I do that? Thanks for all/any responses.