Answers for "python connecto local 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 "SQL"

Browse Popular Code Answers by Language