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.

how does phpmyadmin know/use the mysql root password when using it from WHM

Discussion in 'Database Discussions' started by aww, Dec 20, 2011.

  1. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I'm curious how phpmyadmin can work from WHM as root without the root password?

    Supposedly cpanel does not store the mysql root password in plain text like plesk does?

    I'm trying to find a way to run mysqlcheck --check --all-databases

    without having to lookup/fetch the mysql root password and it occurred to me that maybe I can do it how phpmyadmin does it?

    In plesk you can do mysqlcheck --check --all-databases -uadmin -p`cat /etc/psa/.psa.shadow`
    Trying to find a similar way for cpanel

    Thanks for any insight.
     
  2. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Re: how does phpmyadmin know/use the mysql root password when using it from

    Oh wow, apparently I just need to do

    -uroot

    without any password and it works?

    Is that a bad thing?
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Re: how does phpmyadmin know/use the mysql root password when using it from

    Hello,

    Usually cPanel will store the MySQl root password at /root/.my.cnf as plain text under [client] section. If that file doesn't exists for you, try to do a MySQL root password reset from WHM.

    Thank you,
    Nibin.
     
Loading...

Share This Page