Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

python connect to mysql

import mysql.connector

# MySql Connection 
mydb = mysql.connector.connect(
  host="localhost",
  user="root",
  password="yourpassowrd",
  database="databasename"
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #connect #mysql
ADD COMMENT
Topic
Name
7+9 =