Thread: Localhost ????

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bridgeport,CT,USA
    Posts
    4
    Rep Power
    0
    Hi, I am quite new to this and have a problem. My friend has a unix server and I am a user. The server allows us to setup our MySQL instance on any of the machines being root. This gives me a chance to maintain my own server. Now when I want to use localhost what should I use? If I have to use the computer I was logged on then I forgot that. Is there a way I can find about that? Another thing is that, in username what name do I use, the username of my account or database username ie is root? And similarly which password should I use? It would be great help, thanks
    Amad
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Seattle Wa Us
    Posts
    12
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by amad:
    Hi, I am quite new to this and have a problem. My friend has a unix server and I am a user. The server allows us to setup our MySQL instance on any of the machines being root. This gives me a chance to maintain my own server. Now when I want to use localhost what should I use? If I have to use the computer I was logged on then I forgot that. Is there a way I can find about that? Another thing is that, in username what name do I use, the username of my account or database username ie is root? And similarly which password should I use? It would be great help, thanks
    Amad
    [/quote]

    You are leaving alot of information out. I need to know what kind of unix he/she is runnig. I run Suse linux on two internet servers and have two test Linux servers that are not connected to the net. I don't really get what you are asking. I know that if you want to do anything with with administration in mind you have to log in as root.

    Please further explain your problem then I could peobably help you.
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    host=name (or IP) of the host the mysql server is on
    name=your mysql username (root in your example)
    password=mysql password for the given username

    Remember, if you are connecting from a machine different than the one mysql is on, you need to set permissions specifically for the machine you are connecting from.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Seattle Wa Us
    Posts
    12
    Rep Power
    0
    Oh, I see what you mean. You must tell mysql to allow you remote name. If you remote login into a DHCP server, it could be a problem.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bridgeport,CT,USA
    Posts
    4
    Rep Power
    0
    Sorry to bother you guys but I tried that with no success. I did exactly what you said but does not work. The page that is shown says that
    "Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/username/.public_html/phplocation/submit.php3
    on line 18
    Unable to connect to the specified database


    And the main thing is that I defined the host as localhost. I may be doing a mistake by doing this coz as I have already said that the administrator allows us to maintain our own MySQL server, and I don't know which computer I was using when I installed MySQL. Thanks for your help

  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Seattle Wa Us
    Posts
    12
    Rep Power
    0
    Your problem is that the MySql deamon has not been started (mysql is not on) . I can't remeber what the command is, though.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bridgeport,CT,USA
    Posts
    4
    Rep Power
    0
    I got it now and it is running. All I had to do is run the server in one machine and give the same name of the machine in the php file. If I ever turn it off it will not work. Thanks for all your help.

Similar Threads

  1. 'localhost' does not work
    By sparkrulez in forum Apache Development
    Replies: 4
    Last Post: August 26th, 2004, 09:25 PM
  2. Replies: 0
    Last Post: October 17th, 2003, 02:49 PM
  3. Access to Oracle works from localhost, but not live server
    By pablo.gosse in forum PHP Development
    Replies: 3
    Last Post: March 27th, 2003, 06:17 PM
  4. Replies: 3
    Last Post: December 31st, 2002, 10:08 AM
  5. Replies: 2
    Last Post: August 27th, 2002, 11:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo