HOME/Articles/

mysql example consulta (snippet)

Article Outline

Python mysql example 'consulta'

Modules used in program:

  • import mysql.connector

python consulta

Python mysql example: consulta

import mysql.connector

mydb = mysql.connector.connect(
    host="localhost",
    user="YourUser",
    passwd="YourPass"
)
print(mydb)