Hi.

I haven't used Django with mysql, but judging from your error
it sounds like you haven't created the database in mysql. Django
probably cannot create a db like it can when you use sqlite, as it's
only a file anwyays. So you need to use your mysql tool
phpmyadmin or whatever you use and create the db and then
you can run syncdb. If that doesn't fix the problem, you have a
lot more interesting problem.

~Jakob

On 27 Apr., 10:33, 83nini <83n...@gmail.com> wrote:
> Hi guys,
>
> I'm working on the tutorial onwww.djangobook.com.
> I've created a database using "manage.py starapp books" then i
> modified the "models.py" file to include classes where each class
> represents a column in the database. then i modified the "settings.py"
> file to include the following:
>
> DATABASE_ENGINE = 'mysql'
> DATABASE_NAME = 'books'
> DATABASE_USER = 'Lina'
> DATABASE_PASSWORD = 'somepassword'
> DATABASE_HOST = 'localhost'
> DATABASE_PORT = '3306'
>
> and:
>
> INSTALLED_APPS = (
>     #'django.contrib.admin',
>     'helloworld.books',
>     #'django.contrib.auth',
>     #'django.contrib.contenttypes',
>     #'django.contrib.sessions',
>     #'django.contrib.sites',
> )
>
> should i be good to go or what? why do i get the long long long error
> that ends with:
> _mysql_exceptions.OperationalError: (1049, "Unknown database 'books'")
>
> when i try to validate the database using "C:\....path to django
> project folder...> python manage.py validate"
>
> I really need and appreciate your help.
>
> cheers,
> Lina
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to