私はWindows 7を使用しています。多くの問題とpython 3.3およびdjango 1.5.1の後にMysql 5.5をインストールしました。mysqlでデータベースを作成しましpython manage.py syncdb
た。初めて実行すると、SyntaxError: invalid syntax (connections.py, line 36)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'test_django', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': 'root',
'PASSWORD': 'root',
'HOST': 'localhost', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '3306', # Set to empty string for default.
}
}
もちろん、パスワードとデータベース名は正しいです。何か案は?
編集 - connections.py は mysqldb モジュールにあり、36 行目にあります
raise errorclass, errorvalue
トレースバックを表示するにはどうすればよいですか?