won't connect to mysql as root

Discussion in 'Perl Misc' started by Nikola Skoric, Jan 15, 2004.

  1. Hello,

    I have a very interesting problem. I'm connecting to local mysql
    database using DBI. I can connect and do queries as ordinary user
    (username 'nick'), but when I connect as root (username 'root', of
    course :) ), I get error "Access denied for user 'root@my_machine'
    (Using password: YES)" ... I'm 100% sure the pass is correct. Where
    should I search for a problem?

    --
    Pozdrav/Regards, Nikola [Nick] Skoric.
    "...Usne, tice-rugalice - a u oku tajac
    Da sam kaput sa dva lica, da sam Gospo'n Propalica..."
    http://newusers.cjb.net/ - site o Usenetu na hrvatskom!
     
    Nikola Skoric, Jan 15, 2004
    #1
    1. Advertising

  2. Nikola Skoric wrote:
    > I have a very interesting problem. I'm connecting to local mysql
    > database using DBI. I can connect and do queries as ordinary user
    > (username 'nick'), but when I connect as root (username 'root', of
    > course :) ), I get error "Access denied for user
    > 'root@my_machine' (Using password: YES)" ... I'm 100% sure the pass
    > is correct. Where should I search for a problem?


    Well, not here, since it's not a Perl problem.

    You probably created the database as 'nick'. Whether you are able to
    also access it as 'root' is reasonably a MySQL setting issue.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Jan 15, 2004
    #2
    1. Advertising

  3. On Thu, 15 Jan 2004 09:15:20 +0100, Nikola Skoric wrote:

    > I have a very interesting problem. I'm connecting to local mysql
    > database using DBI. I can connect and do queries as ordinary user
    > (username 'nick'), but when I connect as root (username 'root', of
    > course :) ), I get error "Access denied for user 'root@my_machine'
    > (Using password: YES)" ... I'm 100% sure the pass is correct. Where
    > should I search for a problem?


    Well, it's primarily a MySQL question... but are you certain that you're
    using the correct root password? By default, there are *two* entries in
    the user table for 'root' - one for local connections and one for remote.
    If they're not the same, you need to be certain you're using the correct
    one.

    If that doesn't help, you might try a MySQL group or list for a better
    answer.

    sherm--
     
    Sherm Pendley, Jan 15, 2004
    #3
  4. Dana Thu, 15 Jan 2004 08:53:19 GMT,
    kaze:
    > On Thu, 15 Jan 2004 09:15:20 +0100, Nikola Skoric wrote:
    >
    > > I have a very interesting problem. I'm connecting to local mysql
    > > database using DBI. I can connect and do queries as ordinary user
    > > (username 'nick'), but when I connect as root (username 'root', of
    > > course :) ), I get error "Access denied for user 'root@my_machine'
    > > (Using password: YES)" ... I'm 100% sure the pass is correct. Where
    > > should I search for a problem?

    >
    > Well, it's primarily a MySQL question... but are you certain that you're
    > using the correct root password? By default, there are *two* entries in
    > the user table for 'root' - one for local connections and one for remote.
    > If they're not the same, you need to be certain you're using the correct
    > one.


    I'm sure. I have PHP scripts connecting from both localhost and remote
    hosts.

    > If that doesn't help, you might try a MySQL group or list for a better
    > answer.


    OK.

    --
    Pozdrav/Regards, Nikola [Nick] Skoric.
    "...Usne, tice-rugalice - a u oku tajac
    Da sam kaput sa dva lica, da sam Gospo'n Propalica..."
    http://newusers.cjb.net/ - site o Usenetu na hrvatskom!
     
    Nikola Skoric, Jan 15, 2004
    #4
  5. Nikola Skoric <> wrote:

    > I have a very interesting problem. I'm connecting to local mysql
    > database using DBI. I can connect and do queries as ordinary user
    > (username 'nick'), but when I connect as root (username 'root', of
    > course :) ), I get error "Access denied for user 'root@my_machine'
    > (Using password: YES)" ... I'm 100% sure the pass is correct.



    What is your Perl question?


    > Where
    > should I search for a problem?



    You have already found a problem. You need to search for a solution.

    Since it is a DB problem, search for the solution is some place
    about databases.

    This here newsgroup is about a programming language, not about databases...


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 15, 2004
    #5
  6. Tad McClellan <> wrote in
    news::

    > Nikola Skoric <> wrote:
    >
    >> I have a very interesting problem. I'm connecting to local mysql
    >> database using DBI. I can connect and do queries as ordinary user
    >> (username 'nick'), but when I connect as root (username 'root', of
    >> course :) ), I get error "Access denied for user 'root@my_machine'
    >> (Using password: YES)" ... I'm 100% sure the pass is correct.

    >
    >
    > What is your Perl question?


    mysql> SELECT `question` FROM `comp.lang.perl.misc` WHERE `author`
    ="Nikola Skoric" and `question` LIKE "%perl%";
    Empty set (0.00 sec)

    >> Where
    >> should I search for a problem?

    >
    >
    > You have already found a problem. You need to search for a solution.


    mysql> SELECT `problem` FROM `comp.lang.perl.misc` WHERE `problem` IS NOT
    NULL;
    Infinite rows in set (9999999 sec)

    > Since it is a DB problem, search for the solution is some place
    > about databases.


    mysql> SELECT `solution` FROM `comp.lang.perl.misc` WHERE `content` LIKE
    "%database%";
    Empty set (0.00 sec)

    > This here newsgroup is about a programming language, not about
    > databases...


    mysql> SELECT `content` FROM `comp.lang.perl.misc` WHERE `content` LIKE
    "%database%";
    Empty set (0.00 sec)



    Ok, so that was lame... It's been a long day :)


    --
    Marc Bissonnette
    CGI / Database / Web Management Tools: http://www.internalysis.com
    Something To Sell? Looking To Buy? http://www.whitewaterclassifieds.ca
    Looking for a new ISP? http://www.canadianisp.com
     
    Marc Bissonnette, Jan 15, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,282
  2. Rick Osborn
    Replies:
    10
    Views:
    3,993
    Jon A. Cruz
    Feb 8, 2004
  3. hector
    Replies:
    5
    Views:
    438
    CBFalconer
    Dec 5, 2006
  4. Replies:
    6
    Views:
    224
  5. Allen Marshall
    Replies:
    1
    Views:
    218
    Gunnar Hjalmarsson
    Jan 24, 2004
Loading...

Share This Page