Error: No module named mysql.base when trying to sync.db

404 views
Skip to first unread message

nai

unread,
Apr 1, 2011, 3:48:54 AM4/1/11
to Django users
I posted the same question on stackoverflow here:
http://stackoverflow.com/questions/5509755/problem-with-django-syncdb-on-amazon-ec2

Reproduced

Hi all, I'm trying to deploy my project on my EC2 instance. When I run
python manage.py validate I get this error Error: No module named
mysql.base .

I have already installed MySQL-python using yum install MySQL-python.
I can import MySQLdb successfully from the Python interpreter.

I can't seem to figure out what's wrong?

I am using Django 1.3 and Python 2.6 and MySQLdb 1.2.3c1

dsx

unread,
Apr 12, 2011, 2:56:37 PM4/12/11
to Django users
same here.

On Apr 1, 12:48 am, nai <chng.nai...@gmail.com> wrote:
> I posted the same question on stackoverflow here:http://stackoverflow.com/questions/5509755/problem-with-django-syncdb...

pagan

unread,
Apr 14, 2011, 5:04:18 AM4/14/11
to Django users
same problem. apache2, mod_wsgi, python-mysqldb installed. When i add
databases engine, name, user, password in settings.py, i got a
message:

ImportError at /wsgi
No module named mysql.baseRequest Method: GET
Request URL: http://xxxxx/wsgi
Django Version: 1.3
Exception Type: ImportError
Exception Value: No module named mysql.base
Exception Location: /usr/lib/python2.5/site-packages/django/utils/
importlib.py in import_module, line 35
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/var/lib/python-support/python2.5',
'/home/django-projects/xxxx/apps']

Anyone knows whats that?

paganplan paganplan

unread,
Apr 15, 2011, 5:29:32 AM4/15/11
to Django users
Solved!
in settings.py file, option 'ENGINE' must be like this: django.db.backends.mysql

2011/4/14, pagan <paga...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

Arvind Aj

unread,
May 17, 2014, 11:48:26 AM5/17/14
to django...@googlegroups.com, paga...@gmail.com
Hi,
 Your reply helped big time. thanks a lot  
Reply all
Reply to author
Forward
0 new messages