some trouble with MySQLdb

N

nephish

Hey there all,
i have a question about how to point my python install to my sql database.

when i enter this: db = MySQLdb.connect(user="user", passwd="pass",
db="myDB")

i get this:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in -toplevel-
db = MySQLdb.connect(user="user", passwd="pass", db="MyDB")
File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 66,
in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
134, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1049, "Unknown database 'MyDB'")

i am using the all in one package from lampp (now xampp) and i have
tested a couple of python scripts from the cgi, but.... nothing that
connects to the database.

any ideas?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top