Galil,

Try this also:

mysql> use mysql;
mysql> delete from user where host='%' and 'user='';
mysql> flush privileges;

--Fred
------------------------------------------------------------------------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
------------------------------------------------------------------------
On 1/18/16 2:38 AM, Sergiy Khohlov wrote:

Using password no. Have you set notempty password with creating table permission?

15 січ. 2016 18:20 "Galil" <il...@ajenta.net <mailto:il...@ajenta.net>> пише:

    Hi Fred,

    The user cdraccess is not the root user and it does not have the
    rights to access table 'user'. I deleted the guest user as root
    but nothing changes. The problem was not fixed.

    On Thursday, 14 January 2016 17:50:21 UTC, Fred Stluka wrote:

        Galil,

        I had a problem like this a couple years ago, and the solution
        was to delete the anonymous MySQL guest user as:

        mysql> use mysql;
        mysql> delete from user where host='localhost' and 'user='';
        mysql> flush privileges;

        I'm not sure why Django 1.4 was trying to connect as the guest
        user when it had a username and password that it was
        supposed to be using, but for some reason it was. Deleting
        the guest user from MySQL fixed it for me, and is a good idea
        for security reasons anyhow.

        --Fred
        ------------------------------------------------------------------------
        Fred Stluka -- mailt...@bristle.com --
        http://bristle.com/~fred/ <http://bristle.com/%7Efred/>
        Bristle Software, Inc -- http://bristle.com -- Glad to be of
        service!
        Open Source: Without walls and fences, we need no Windows or
        Gates.
        ------------------------------------------------------------------------
        On 1/14/16 7:11 AM, Galil wrote:

        I have created a Django app and which uses MySQL. The
        settings.py file in the database sections is:

        |DATABASES
        
={'cdraccess':{'ENGINE':'django.db.backends.mysql','NAME':os.environ.get('CDR_DB_NAME','portal2'),'USER':os.environ.get('CDR_DB_USER','cdraccess'),'HOST':os.environ.get('CDR_DB_HOST','127.0.0.1'),'CONN_MAX_AGE':0,'PASSWORD':os.environ.get('CDR_DB_PASSWORD',''),},'default':{'ENGINE':'django.db.backends.sqlite3','NAME':'db.sqlite3',}}|

        I run the app like:

        |CDR_DB_PASSWORD='password'CDR_DB_HOST='host_name'./manage.py
        runserver|

        but I get the following error:

            Access denied for user 'cdraccess'@'host_ip_here' (using
            password: NO)")

        I tried to access the database from terminal, like:

        |$ mysql --host=[host_name]--user=cdraccess -p portal2|

        and worked fine.

        What is going wrong in here? And what does this "(using
        password: NO)" mean?


-- 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...@googlegroups.com.
        To post to this group, send email to django...@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/e1c26a0d-a509-46eb-b496-f7f09161e606%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
    <mailto:django-users+unsubscr...@googlegroups.com>.
    To post to this group, send email to django-users@googlegroups.com
    <mailto: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/fa3b7acf-e015-4e0c-abbe-49da80b752a9%40googlegroups.com
    
<https://groups.google.com/d/msgid/django-users/fa3b7acf-e015-4e0c-abbe-49da80b752a9%40googlegroups.com?utm_medium=email&utm_source=footer>.
    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 <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto: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/CADTRxJNBV29q6XBTjSK0haKpVNhNe%3Dj5BtUxCmgL%2BwtrAOvEsQ%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CADTRxJNBV29q6XBTjSK0haKpVNhNe%3Dj5BtUxCmgL%2BwtrAOvEsQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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/569E79CD.4080908%40bristle.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to