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 Hostname?

Discussion in 'General Discussion' started by dyr, Apr 28, 2012.

  1. dyr

    dyr Registered

    Joined:
    Apr 27, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi, I've set up a mySQL database for my site and have set the hostname to 'localhost'. I have set up php script such as register, login/logout, etc. I'd like the users information to be stored in the mySQL database I've specified. Will this work, even if the hostname for my site I set to 'localhost'? I always thought localhost meant only my computer will be able to use the codes?
     
    #1 dyr, Apr 28, 2012
    Last edited: Apr 29, 2012
  2. 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 :)

    Using "localhost" as the hostname in your script configuration is common. It tells the script that MySQL is hosted on the same server the script is uploaded to. Thus, database changes are made to the local MySQL server.

    Thank you.
     
Loading...

Share This Page