Results 1 to 2 of 2

Thread: mySQL Hostname?

  1. #1
    dyr
    dyr is offline
    Registered User
    Join Date
    Apr 2012
    Posts
    3
    cPanel/WHM Access Level

    Website Owner

    Default mySQL Hostname?

    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?
    Last edited by dyr; 04-29-2012 at 12:05 PM.

  2. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    9,390
    cPanel/WHM Access Level

    Root Administrator

    Default Re: mySQL Hostname?

    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services - Change Logs
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

Similar Threads

  1. Where to find my MySQL hostname in cPanel?
    By Pupo in forum New User Questions
    Replies: 2
    Last Post: 11-24-2009, 05:35 AM
  2. Hostname changed. cPanel/WHM still try to access original hostname
    By Nathan D. in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 09-24-2009, 04:42 PM
  3. SSL cert works for hostname/cpanel but not hostname:2082
    By foxphiles in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 04-30-2008, 09:12 AM
  4. changed hostname, now major mysql problems
    By t17169 in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 02-02-2006, 12:52 PM
  5. Hostname Error but the hostname is set correctly
    By rodstewart in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 04-05-2005, 11:19 AM
bargain