The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    0
    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:
    16
    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:
    16
    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:
    0
    What is the syntax for this?
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    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"
     
  6. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    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
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
  8. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    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 ?
     
  9. abagla

    abagla Member

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

Share This Page