Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ recipe-65235.py
File
recipe-65235.py
recipes/Python/65235_Using_the_MySQLdb_interface/recipe-65235.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
import
MySQLdb
2
3
# Create a connection object and create a cursor
4
Con = MySQLdb.Connect(host=
"127.0.0.1"
, port=3306, user=
"joe"
, passwd=
"egf42"
db=
"tst"
)
Callers
nothing calls this directly
Calls
5
Connect
Method · 0.80
cursor
Method · 0.80
execute
Method · 0.45
fetchall
Method · 0.45
close
Method · 0.45
Tested by
no test coverage detected