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.

Mysql root password at root directory ?

Discussion in 'General Discussion' started by sh4ka, Sep 23, 2005.

  1. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    :confused:

    I just realise that.. there is a my.cnf (hidden) at /root/ directory on my cPanel box...

    Inside the file I can see this:

    [client]
    user="root"
    pass="xxxxxxxxxxxxxxx"

    Is this normal ? should I remove it safety?

    thank you.
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    That is quite normal. You can safely remove that entry. But the only thing is that you have to provide the password each time you try to login to mysql as root. Otherwise it won't promt if you try to login as root..
     
  3. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Yeap... you are right I just tested it.
    Also.. connecting from the windows clinet SSH Secure Shell.. it won't ask for the password too? It happend to me yesterday, from the SSH Secure Shell client from WinXP once logued I just type exit and then press the spacebar and was getting into the system inmmediately witouth any password question. That didn't happen at my linux ssh client.. does this have anything relationated with the root pass ath that mysql archive ?

    thkz!
     
  4. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I am not getting you.. You mean logging to mysql from shell or logging to the server through
    some ssh client.
     
  5. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Sorry for my bad "tarzan" english :p
    I mean logging to the server through
    some ssh client.
     
  6. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Well... that doesnot have anything to do with mysql authentication. That might have been some property of your ssh client, like they might have some options for storing the pasword. Though Iam not sure on that case.
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    As long as your /rot directory permissions are correct, there should be little risk in having your root password in /root/my.cnf. The benefits probably outweigh the likely risk involved.
     
  8. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Thank you very much Aby!
    Does anyone knows what be this rare thing in the ssh client ?
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It's possible that your SSH client is caching the password (unless you have set up key authentication and you would know if you had). Which SSH client are you using?
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's not something that I've seen before. AFAIK, it's only recreated if you set the MySQL password through WHM.
     
  11. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    I use for Win the SSH Secure Shell client 3.9x...
    But that is not important righ now Chirpy, minutes ago I deleted the .my.cnf mysql password file, but now I can see that it is again there!! :S with another mysql password!!! What the *** is happeping , how can it be generated automatically with another password ?

    Help me please, this is very rare :S :confused:
     
  12. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    How can I stopp this automattically generation of the my.cnf file? I just don't want it generated on my root directory... Maybe if I set the root pass using shell ?

    And the most worry thing that I'm thinking... I don't really care if someone can login to the mysql using shell because at that state they already have the server root password and the can do anything... but the thing that is getting me nervious is if the can login as root using the phpmyadmni by the browser..

    Any ideas how to stop this automatic file ?


     
Loading...

Share This Page