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.

Server Name when trying to connect to My SQL remotely

Discussion in 'General Discussion' started by InterMPC, Apr 25, 2012.

  1. InterMPC

    InterMPC Registered

    Joined:
    Apr 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi everyone.

    I have a MySQL database setup which is hosted on a remote server. I am trying to access that data from Excel. Excel is asking me for a server name, and any info I can find tells me to use localhost as the server name. My understanding is that local host will work if the excel document is processing on the system where the MySQL is setup but becuase my BD is hosted externally I'm unsure and unable to find what my 'server name' is that Excel is asking for.

    I beleive I have the right information for User name and password, as this appears to be the same as what I would use if accessing the database with PHP running on that server.

    If anyone can help me I would be really grateful.

    Thank you
     
  2. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
    Use the IP of the server as server name.
    Notice that the port 3306 must be open on that server.
     
  3. InterMPC

    InterMPC Registered

    Joined:
    Apr 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi PlotHost.

    I think you've got me on the right track.

    This is probably going to sound like a really stupid questions but how do I find the IP address of the server.

    Also I have no idea how to ensure that the port 3306 is open. Do I need to ask my hosting company?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Your web hosting provider should have provided you with the IP address assigned to your account when it was created. However, you could just use the same IP address or hostname that you use to access cPanel in your application requesting the remote MySQL server information. Also, you should add your own IP address (if you are connecting from your computer) via:

    "cPanel >> Databases >> Remote MySQL"

    This option is documented at:

    Remote MySQL

    Port 3306 is open by default, however if the connection fails then you can contact your web hosting provider to determine if they are blocking traffic to that port.

    Thank you.
     
  5. InterMPC

    InterMPC Registered

    Joined:
    Apr 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thanks heaps for the response.

    If multiple people had versions of this excel document running on their own PCs would I then need to add all their IP address to Remote MySQL?

    edit:

    I've tried what I think is the IP of my website but that doesn't seem to work. Can I find it in MyCP somewhere?
     
  6. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ask your hosting company for the server IP. Also ask if the 3306 port is open.
     
Loading...

Share This Page