Monday, January 31, 2011

Re: django and mysql connection problem

On Monday, January 31, 2011 2:45:55 PM UTC, cuteangel wrote:

its my first project with django..i already tried the connection with
sqlite.but now m using django's connection with mysql n m getting
following error...

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'")

i did the commands in mysql as follows..i already created the wogma
database just using create database n i granted the priviliges..in
mysql. whts the prb??

You already have correct answers for this question on Stackoverflow. What did you hope to get from posting it here too?
--
DR. 

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

No comments:

Post a Comment