473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

some trouble with MySQLdb

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
Jul 19 '05 #1
0 1032

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Harrison | last post by:
Hi all, got a problem combinging mx and MySQLdb, when I build and install both for my Python2.1 install on a Solaris 9 box I can import mx fine, but importing MySQLdb causing python to core dump. ...
1
by: Peter Nikolaidis | last post by:
Greetings, I am attempting to get MySQLdb 0.9.2 installed on Mac OS 10.2 with a Fink distribution of Python 2.2.2. I have seen only a few posts on the subject, some of them relate to...
2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
2
by: ws Wang | last post by:
MySQLdb is working fine at command line, however when I tried to use it with mod_python, it give me a "server not initialized" error. This is working fine: ----------------------- testmy.py...
2
by: nephish | last post by:
Hey there, does anyone know where i can find some real documentation on the MySQLdb module? This thing is driving me nuts. all i can find on the internet is some brief tutorials. I need to know...
1
by: Steve | last post by:
Darwin steve.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc MacOSX 10.4.3 mysql Ver 14.7 Distrib 4.1.14, for...
5
by: Nicolay A. Vasiliev | last post by:
Hello there! I got some trouble trying to insert data into the database with MySQLdb module. I have such code: from MySQLdb import * def loc_connect_db():
1
by: Yi Xing | last post by:
Hi, I met the following error when I tried to install MySQLdb. I had no problem installing numarray, Numeric, Rpy, etc. Does anyone know what's the problem? Thanks! running install running...
0
by: Paul McNett | last post by:
Vaibhav.bhawsar wrote: Try one of: """ import MySQLdb, MySQLdb.cursors conn = MySQLdb.connect(..., cursorclass=MySQLdb.cursors.DictCursor) """ -or-
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.