can not run manage.py dbshell

359 views
Skip to first unread message

Russ

unread,
Apr 21, 2008, 2:43:17 AM4/21/08
to Django users
Im trying to learn django and I appear to be running into an issue
with python manage.py dbshell I am getting the following error can
anyone shed some light on this for me, Im at a loss

Im running MAC OSX 10.5.2 Leopard
I have installed the MySQLdb

Thank You


$ python manage.py dbshell
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/Library/Python/2.5/site-packages/django/core/management.py",
line 1672, in execute_manager
execute_from_command_line(action_mapping, argv)
File "/Library/Python/2.5/site-packages/django/core/management.py",
line 1569, in execute_from_command_line
action_mapping[action]()
File "/Library/Python/2.5/site-packages/django/core/management.py",
line 1290, in dbshell
runshell()
File "/Library/Python/2.5/site-packages/django/db/__init__.py", line
28, in <lambda>
runshell = lambda: __import__('django.db.backends.%s.client' %
settings.DATABASE_ENGINE, {}, {}, ['']).runshell()
File "/Library/Python/2.5/site-packages/django/db/backends/mysql/
client.py", line 27, in runshell
os.execvp('mysql', args)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/os.py", line 354, in execvp
_execvpe(file, args)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/os.py", line 392, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

Malcolm Tredinnick

unread,
Apr 21, 2008, 3:03:54 AM4/21/08
to django...@googlegroups.com

On Sun, 2008-04-20 at 23:43 -0700, Russ wrote:
> Im trying to learn django and I appear to be running into an issue
> with python manage.py dbshell I am getting the following error can
> anyone shed some light on this for me, Im at a loss
>
> Im running MAC OSX 10.5.2 Leopard
> I have installed the MySQLdb

Django is trying to run the "mysql" command and assumes it exists and is
on your execution path -- not your Python path, but the path that is
searched for executable binaries.

So can you run "mysql" at a shell prompt? I'm not sure if this is a
separate thing that needs to be installed on OS X, but the error you're
seeing seems to suggest that this program isn't available.

Regards,
Malcolm

--
Two wrongs are only the beginning.
http://www.pointy-stick.com/blog/

Russ

unread,
Apr 21, 2008, 3:36:46 AM4/21/08
to Django users
Doh! thanks that fixed it man I feel stupid now :)


On Apr 21, 12:03 am, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
Reply all
Reply to author
Forward
0 new messages