Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Why is mysql asking for a password?

Discussion in 'General Discussion' started by CamronFry, Jan 2, 2005.

  1. CamronFry

    CamronFry BANNED

    Joined:
    Jan 1, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    Why is mysql asking for a password?
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'

    This same command works fine on my other servers:
    root@server101 [/usr/local]# mysqladmin processlist
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+
    | 11310310 | eximstats | localhost | eximstats | Sleep | 20 | | |
    | 11615704 | root | localhost | | Query | 0 | | show processlist |
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+
     
  2. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Cleveland, Ohio
    edit /root/.my.cnf with your root MySQL password. You can also set it in WHM.
     
  3. ntwaddel

    ntwaddel Well-Known Member

    Joined:
    Nov 3, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Templeton, CA
    i dont think you want to store your mysql root pass in any files. just do mysqladmin -u root -p and enter the password
     
  4. CamronFry

    CamronFry BANNED

    Joined:
    Jan 1, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    What is the syntax for this?
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    193
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    If you really really want to have that password in plain sight....

    the syntax is:

    [client]
    user="root"
    password="password"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    Guys, the /root/.my.cnf is / should only be readable by root user itself. I fail to see why this worries you ? Or how that == plain sight ?

    jailshell-2.05b$ cat /root/.my.cnf
    cat: /root/.my.cnf: No such file or directory

    bash-2.05b$ cat /root/.my.cnf
    cat: /root/.my.cnf: Permission denied
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    193
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Because it is a bad practice to do period. Ask any legitimate security expert and they will tell you to never ever have a password in plain text anywhere especially on a public facing server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    And so I assume you don't use and advise not to use mysql on your cpanel servers ? Or you manually set up databases for each client that requests them of you ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. abagla

    abagla Member

    Joined:
    Jan 21, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Kolkata, India
    what to od in my.cnf
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice