Answers for "python best way to connect to mysql"

SQL
5

connect python to mysql

import mysql.connector
mydb = mysql.connector.connect(
  host="localhost",
  user="yourusername",
  password="yourpassword",
  port = 8888, #for Mamp users
  database='whatever db you want'
)
print(mydb)
Posted by: Guest on June-01-2020

Code answers related to "python best way to connect to mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language