import pymysql db = pymysql.connect(user="username", host="academic-mysql.cc.gatech.edu", passwd="password", db="cs2316rdb") c = db.cursor() userName = input("enter your username:") userPass = input("enter your password:") c.execute("SELECT * FROM Travelers WHERE Username = %s", (userName,) ) dbData = c.fetchone() print(list(dbData)) if dbData == None: print("That user does not exist!") else: if userPass == dbData[1]: print("You got the password right!") else: print("you got the password wrong!")