Open database connection - python

0 votes
How do I open a database connection using python?
Jul 22 in Python by Jinu
37 views

1 answer to this question.

0 votes

Hey you can use something like this:

import MySQLdb

# Open database connection
db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )
answered Jul 22 by Kyraa

Related Questions In Python

0 votes
1 answer

Create and open a file in Python

file = open('text.txt', 'w+) READ MORE

answered May 24, 2018 in Python by Nietzsche's daemon
• 4,260 points
66 views
0 votes
0 answers

Cannot make connection to .accdb file using python

I am writing a script that needs ...READ MORE

Jun 6, 2018 in Python by ariaholic
• 7,340 points
634 views
0 votes
2 answers

How do I connect to a MySQL Database in Python?

connect mysql database with python import MySQLdb db = ...READ MORE

answered Mar 28 in Python by rajesh
• 1,210 points
201 views
+2 votes
1 answer

“OSError: Unable to open file (bad superblock version number)" in python h5py file read

File could indeed be opened on Linux ...READ MORE

answered Sep 26, 2018 in Python by Priyaj
• 57,300 points
1,479 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 408 views
+4 votes
6 answers
0 votes
1 answer

Cannot make connection to .accdb file using python

key is just a variable name. for key in ...READ MORE

answered Sep 21, 2018 in Python by charlie_brown
• 7,720 points
82 views
0 votes
1 answer

Cannot make connection to .accdb file using python

That link has instructions for connecting to ...READ MORE

answered Oct 5, 2018 in Python by Priyaj
• 57,300 points
70 views