Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import mysql.connector mydb = mysql.connector.connect( host="localhost", user="myusername", password="mypassword", database="mydatabase" ) mycursor = mydb.cursor() mycursor.execute("SELECT * FROM customers") myresult = mycursor.fetchone() print(myresult)
(1, 'John', 'Highway 21')