auto script returns error accessing database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Galli

    #1

    auto script returns error accessing database

    I have a shopping cart with an automatic installation script. Add a new
    database without tables, configure the script with the table's
    user/password, and it's supposed to set up all the tables in the database.

    Yet each time I call the setup program, I get this error:

    DataBase Error, mySQL Error Reason :
    Access denied for user: 'username@domai n.com' (Using password: YES) at
    /home/webadmin/[omitted]/cgi-bin/[omitted].pm line 109

    The password appearing in the script is definitely not "YES" and I have
    checked to ensure that the script contains the correct user and password
    for the database.'

    Any ideas

    --
    Best wishes

    Richard Galli
  • Bill Karwin

    #2
    Re: auto script returns error accessing database

    Richard Galli wrote:[color=blue]
    > Access denied for user: 'username@domai n.com' (Using password: YES) at
    > /home/webadmin/[omitted]/cgi-bin/[omitted].pm line 109
    >
    > The password appearing in the script is definitely not "YES"[/color]

    This is an understandable mistake, given the phrasing of the error
    message! :-)

    But the phrase doesn't mean that it's using the word "YES" as a
    password, it means that it *is* using a password, as opposed to
    connecting to a database using a login without specifying a password.

    In my experience, one common reason for the error you describe is that
    the database exists, but no one granted access to that database for
    'username@domai n.com' with the password you know is correct.

    Log in as the superuser and issue a command such as:

    GRANT ALL ON mydatabase.* TO 'user'@'domain. com' IDENTIFIED BY
    'thecorrectpass word';

    Of course, substitute the names of things as appropriate.

    Note that the user and the domain are quoted individually, with a @
    between them. If you say 'user@domain.co m', it interprets that whole
    string as a user's name on the local host.

    See http://dev.mysql.com/doc/mysql/en/adding-users.html and other pages
    in the same section of the doc for more information.

    Regards,
    Bill K.

    Comment

    Working...