FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PythonProgramming.net-Website/dbconnect.py at master · PythonProgramming/PythonProgramming.net-Website · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
PythonProgramming
/
PythonProgramming.net-Website
Public
Notifications
You must be signed in to change notification settings
Fork
60
Star
78
Code
Issues
2
Pull requests
3
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
PythonProgramming.net-Website
/
dbconnect.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (9 loc) · 340 Bytes
Breadcrumbs
PythonProgramming.net-Website
/
dbconnect.py
Copy path
File metadata and controls
11 lines (9 loc) · 340 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
import
MySQLdb
# mysql --user=root -p
def
connection
():
conn
=
MySQLdb
.
connect
(
host
=
"localhost"
,
# your host, usually localhost
user
=
""
,
# your username
passwd
=
""
,
# your password
db
=
"pythonprogramming"
)
# name of the data base
c
=
conn
.
cursor
()
return
c
,
conn
Back
|
FazBrowse Home
|
New Git URL