Being a newbie has its challenges...
Before going any further on the answers to my earlier post, I thought
I should walk through the setup process once more.
I set up a new app. I can load the "it worked!" page using a browser
on the localhost with "runserver". When I ran the "manage.py syncdb"
method as part of walking through the project setup process, it threw
an exception, see traceback below.
The server is running mysql, I use phpMyAdmin and a couple of other
applications successfully with it.
There is an existing database of the same name as the new django
project.
I didn't find anything interesting in the logs, but then the django
logs are empty at the moment.
I did not find a file at "/tmp/mysql.sock"
I found some references to the 2002 error but they seemed to be
problems of whether mysql was running or installed.
Can someone point me in the right direction?
- Mark
Traceback
=========
admin$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Django-0.95.1-py2.4.egg/django/core/
management.py", line 1319, in execute_manager
execute_from_command_line(action_mapping, argv)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Django-0.95.1-py2.4.egg/django/core/
management.py", line 1243, in execute_from_command_line
action_mapping[action]()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Django-0.95.1-py2.4.egg/django/core/
management.py", line 446, in syncdb
cursor = connection.cursor()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Django-0.95.1-py2.4.egg/django/db/backends/
mysql/base.py", line 90, in cursor
self.connection = Database.connect(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/MySQLdb/__init__.py", line 66, in Connect
return Connection(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/MySQLdb/connections.py", line 134, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local
MySQL server through socket '/tmp/mysql.sock' (2)")
settings.py
=========
DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql',
'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'FirstDjango' # Or path to database file
if using sqlite3.
DATABASE_USER = 'some_name' # Not used with sqlite3.
DATABASE_PASSWORD = 'some_string' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost.
Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not
used with sqlite3.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---