import of mysql in settings.py

0 views
Skip to first unread message

mpls

unread,
Aug 21, 2008, 5:52:47 PM8/21/08
to Django users
I've edited the DATABASE_ENGINE = 'mysql' in settings.py along with
specifying a database name and user account info. But I get the
following error:

ImportError: No module named mysql.base

How can I fix this problem. Any help is appreciated.

Cortland Klein

unread,
Aug 21, 2008, 7:09:57 PM8/21/08
to django...@googlegroups.com
I just had the same problem. It has something to do with MySQLdb not
being included.

For me, I think it's because Mac OS X 10.5.4 doesn't have this python
thing installed. The documentation and tutorial should mention this,
IMO.

http://code.djangoproject.com/ticket/5531#comment:12

--
Cortland Klein <m...@pixelcort.com> +1 408 506 9791
http://pixelcort.com/
529 Water Witch Way
San Jose, CA, USA

Alumni, Business Management <ckl...@email.sjsu.edu>
San José State University

Alumni Technical Advisor, Entrepreneurial Society <cort...@e-society.org
>
http://e-society.org/

Q&A Techie, Silicon Valley Mac User Group
http://svmug.org/


Ian Holsman

unread,
Aug 21, 2008, 10:23:41 PM8/21/08
to django...@googlegroups.com
Cortland Klein wrote:
> I just had the same problem. It has something to do with MySQLdb not
> being included.
>
>

when it rain's it pours. I'm been hitting my head on the same problem.
to verify that this is the case just replace 'mysql' with 'dummy' and
you should be able to validate the problem is with the include.

regards
Ian

Karen Tracey

unread,
Aug 22, 2008, 10:37:49 AM8/22/08
to django...@googlegroups.com
On Thu, Aug 21, 2008 at 10:23 PM, Ian Holsman <kry...@gmail.com> wrote:

Cortland Klein wrote:
> I just had the same problem. It has something to do with MySQLdb not
> being included.
>
>

when it rain's it pours. I'm been hitting my head on the same problem.
to verify that this is the case just replace 'mysql' with 'dummy' and
you should be able to validate the problem is with the include.

FYI the vagueness of this error message was an unintentional side-effect of some recent database backend changes.  As of the latest (8466) revision, the previous more specific message that complains either that MySQLdb is too old or not present at all has been restored.  You still need to install a recent enough MySQLdb, but at least now the message again points to what the real problem is.

Karen

Reply all
Reply to author
Forward
0 new messages