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!

Hide Remote MySql server IP address in phpmyadmin

Discussion in 'Security' started by sinai, Jan 30, 2018.

Tags:
  1. sinai

    sinai Registered

    Joined:
    Jan 29, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    Hi,
    I have connected WHM to a remote MySql server. Everything's OK. The only issue is that when I open phpmyadmin it shows the IP address of the remote mysql server (172.16.1.20:3306). What should be changed to phpmyadmin displays the host name of the remote server instead of its IP address? It is a local server and has a private IP address so I have added a host name in /etc/hosts:
    172.16.1.20 databaseserver
    and put the name in /root/.my.cnf
    [client]
    password="mypassword"
    user=root
    port=3306
    host=databaseserver
    I also changed the mysql-host in the file /usr/local/cpanel/etc/cpanel.config and set it to `databaseserver`.
    Any help is appreciated.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I don't believe it's possible to modify the behavior of phpMyAdmin (as provided with cPanel) to hide the IP address of the actual MySQL server you are managing the database of. You can open a feature request for this at:

    Submit A Feature Request

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sinai

    sinai Registered

    Joined:
    Jan 29, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    The strange issue is that I have done this before in one of our cPanel servers!! I attached an image, please check it out.
    I set the same configurations on the new server as the old server but the new server is showing the IP address!!!
     

    Attached Files:

  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you notice any differences in the /root/.my.cnf file on the two cPanel servers (note this file includes the password, so don't post the password here on the public forums)? Is there a difference in cPanel versions?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. sinai

    sinai Registered

    Joined:
    Jan 29, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    The old server (which is displaying dbs):
    66.0 (build 34)
    [client]
    user=root
    password="XXXXXX"
    port=3306
    host=dbs
    -------------------
    The new server (which is displaying IP address):
    68.0 (build 27)
    [client]
    password=XXXXXX
    user=root
    port=3306
    host=dbs
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look at the affected systems?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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