How to connect sql with python | Sololearn: Learn to code for FREE!

+17

How to connect sql with python

How to connect python with sql workbench

2 Answers

New Answer

+7

Use SQL connector - Something like this.. import mysql.connector mydb = mysql.connector.connect( host="localhost", user="yourusername", password="yourpassword", port = portno, database='whatever db you want' ) print(mydb)

+12