这是我第一次使用Django进行项目开发..之前已经尝试过与SQLite的连接。但现在我正在使用Django的连接方式来连接MySQL,但是我遇到了以下错误...
D:\project\wogma>manage.py syncdb
Traceback (most recent call last):
File "D:\project\wogma\manage.py", line 11, in <module>
execute_manager(settings)
File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line
340, in execute_manager
utility.execute()
File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line
295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python26\lib\site-packages\django\core\management\base.py", line 192,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python26\lib\site-packages\django\core\management\base.py", line 218,
in execute
self.validate()
File "C:\Python26\lib\site-packages\django\core\management\base.py", line 246,
in validate
num_errors = get_validation_errors(s, app)
File "C:\Python26\lib\site-packages\django\core\management\validation.py", lin
e 65, in get_validation_errors
connection.validation.validate_field(e, opts, f)
File "C:\Python26\lib\site-packages\django\db\backends\mysql\validation.py", l
ine 8, in validate_field
db_version = connection.get_server_version()
File "C:\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 27
7, in get_server_version
self.cursor()
File "C:\Python26\lib\site-packages\django\db\backends\__init__.py", line 56,
in cursor
cursor = self._cursor(settings)
File "C:\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 26
2, in _cursor
self.connection = Database.connect(**kwargs)
File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "C:\Python26\lib\site-packages\MySQLdb\connections.py", line 188, in __in
it__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1049, "Unknown database 'd:/project/wogma/w
ogma'")
我在mysql中执行了以下命令。 我已经使用create database创建了wogma数据库,并授予了权限。 那问题是什么?