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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNSOnly mysql password

Discussion in 'Bind / DNS / Nameserver Issues' started by rahnev, Mar 15, 2018.

Tags:
  1. rahnev

    rahnev Active Member

    Joined:
    Jul 6, 2016
    Messages:
    36
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    Is there any way to view the current MySQL password on cPanel DNSOnly installation? I can login to it using mysql command but want to view the current one. There is no way to change it via Web UI.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The MySQL root password is stored in the /root/.my.cnf file by default.

    Thank you.
     
  3. rahnev

    rahnev Active Member

    Joined:
    Jul 6, 2016
    Messages:
    36
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    On cPanel installation - yes, but on cPanel DNSOnly - there is no such file.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Is it possible it exists at another location? You can try finding it with a command such as:

    Code:
    find / -name ".my.cnf"
    If it doesn't exist, you can manually create this file in the /root directory with root ownership and 0600 permissions. Then, ensure the contents look like this:

    Code:
    [client]
    password=MySQLRootPasswordHere
    user=root
    Once this file is setup, you can follow the instructions to reset the MySQL root password from the top answer on a third-party URL like this:

    Change mysql root password on Centos7

    Thank you.
     
Loading...

Share This Page