Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2005
    Posts
    9

    Unanswered: Localhost on networked computers

    Hey

    I currently have Apache server running on a standalone computer, connecting to a mySql database. I would like to make this database available for everyone in my company.

    If I networked the computers using a hub, how would I go about pointing them all to the same local host?



    Thanks
    Conor
    Last edited by Conor; 02-09-05 at 14:20.

  2. #2
    Join Date
    Feb 2005
    Posts
    4
    oops i misread the question
    Last edited by ctaclas; 02-09-05 at 16:01.

  3. #3
    Join Date
    Dec 2003
    Posts
    56
    localhost is always the local computer. There is no way to change it for a PC to point at you apache server etc. The easiest way to make all pc's in a small netowkr see the server by name is create a hosts file with the ip adress and a hostname for the server on each PC.

  4. #4
    Join Date
    Jan 2005
    Posts
    9
    Thanks for your reply - Can you explain how I'd go about doing that?


    Thanks
    Conor

  5. #5
    Join Date
    Jan 2005
    Posts
    362

    some problem

    I have done the some for our mysql 3.23, i give the name of my computer (windows xp home) from mycomputer (or something like this, I have the greek version)-"properties"-"full name"

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you need to ensure your server is named and available on the network
    if its a windows system look for the proprties tab on the network set the host name to whatever

    depends on your network infrastructre as to whether you are running using Hosts & LMHosts or some other suthentication system (LDAP Active Directory etc) presumably your network trolls can help you out with that one.

    remember to do the grants for the the users. if the only users are goping to be from you local network you can probably get away with doing a grant by IP address

    eg
    grant typeofaccess on databasename to '%'@192.168.1 identified by 'password';

    But i'd think very very carefully before granting any uncontrolled access to users, might allow view but doubt would allow change or delete, and defiantely not alter or drop permissions

    if you are planning to access the app from a program eg VB or Access then you could propbably restrict the grant to a specified user

  7. #7
    Join Date
    Jan 2005
    Posts
    9
    Hey

    The network is very small (connected through a hub). The "server" would be a computer that is always on.

    Access to the database would be through PHP pages, and Internet Explorer. I was thinking that I could connect to the database through the PHP script through one username and password, and let everyone view the pages.

    Would it work if I made the htdocs file available to all the connected computers?


    Conor

  8. #8
    Join Date
    Jan 2005
    Posts
    362

    localhost

    I think, I make the some I home a server (not apatci) with php and mysql, the others can view my php files by Int. Explorer via http://yourservername/folder/... I think you may do the some, look at server's IE:http//localhost ?
    I have no experience with apatci, so...
    dimis

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If you are planning to make your data available through a web interface using PHP (or any other scritping language for that matter) then you only need one userid for the script to talk to the database.

    However if you are allowing updates, or have sensitive informaiton you may need to structure your access using userid's and passwords. As you (probably) would for any database application.

    Its not a quick and easy fix, developing the site from scratch. Its a great method of deployting reporting and querying, but probably less use for data entry.

    Strictly speaking you could address the files like any resoiurce through a browser
    by ip eg
    http://192.168.1.1/path/to/file.name
    OR
    http://Conors.Employers.server/path/to/file.name
    you may need to define the IP & host alias within the hosts/LMhosts files, or DNS server or whatever means you already use to control the network. For 8 PC's its probably managable using hosts/lmhosts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •