Results 1 to 2 of 2

Thread: mySQL Hostname?

  1. #1
    dyr
    dyr is offline
    Registered User
    Join Date
    Apr 2012
    Posts
    3
    cPanel 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 01:05 PM.

  2. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    17,026
    cPanel 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. Disable DNS (hostname) lookup for MySQL
    By Sindre in forum Database Discussions
    Replies: 1
    Last Post: 04-21-2014, 12:04 PM
  2. Replies: 1
    Last Post: 03-03-2014, 11:04 AM
  3. Help on mysql hostname log error
    By ultralion in forum General Discussion
    Replies: 10
    Last Post: 09-18-2013, 10:58 AM
  4. Where to find my MySQL hostname in cPanel?
    By Pupo in forum General Discussion
    Replies: 2
    Last Post: 11-24-2009, 06:35 AM
  5. changed hostname, now major mysql problems
    By t17169 in forum General Discussion
    Replies: 5
    Last Post: 02-02-2006, 01:52 PM
bargain