Re: Problem in django tutorial 5 , 1044 Access denied for user @'localhost' database error

2017-01-12 Thread Melvyn Sopacua
On Thursday 12 January 2017 01:24:05 Shashank Yadav wrote:


> $ python manage.py test polls
> Creating test database for alias 'default'...
> Got an error creating the test database: (1044, "Access denied for
> user 'myprojectuser'@'localhost' to database 'test_myproject'")

> I also ran ,"GRANT ALL PRIVILEGES ON test_myproject TO
> 'myprojectuser'@'localhost';" , in mysql

This isn't the same as:
GRANT ALL PRIVILEGES ON test_myproject.* TO ...;

which is what you need. Yes, I'm making you look for the difference, so you 
don't 
forget ;)
-- 
Melvyn Sopacua

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2237626.m80y03hY4v%40devstation.
For more options, visit https://groups.google.com/d/optout.


Re: Problem in django tutorial 5 , 1044 Access denied for user @'localhost' database error

2017-01-12 Thread Andreas Kuhne
You need to have the database create permission as well. Otherwise django
can't recreate the database. What happens when you start the tests is that
the database is dropped and recreated each time.

Regards,

Andréas

2017-01-12 10:24 GMT+01:00 Shashank Yadav :

> Hello,
>
> I am working on tutorial 5 , i tried running a test:
>
> $ python manage.py test polls
> Creating test database for alias 'default'...
> Got an error creating the test database: (1044, "Access denied for user
> 'myprojectuser'@'localhost' to database 'test_myproject'")
> Type 'yes' if you would like to try deleting the test database
> 'test_myproject', or 'no' to cancel: yes
> Destroying old test database for alias 'default'...
> Got an error recreating the test database: (1044, "Access denied for user
> 'myprojectuser'@'localhost' to database 'test_myproject'")
>
>
> I have tried mentioning the test_name in settings.py
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'myproject',
> 'USER': 'myprojectuser',
> 'PASSWORD': 'password',
> 'HOST': 'localhost',
> 'PORT': '',
> 'TEST_NAME': 'test_database_myprojecttest',
> }
> }
>
> I also ran ,"GRANT ALL PRIVILEGES ON test_myproject TO 
> 'myprojectuser'@'localhost';"
> , in mysql
>
>
> Still cannot run the test. What should i do ?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/482263d6-f640-46c0-928e-f532e0b6c838%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUbn7fD4rqtaVNFTMUUcf4eDCpXBrswNEjzTrL_R99U9jfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.