Thread: localhost ?

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

    Join Date
    Jan 2000
    Location
    killington,vt,usa
    Posts
    1
    Rep Power
    0
    When using submitform.php3, the MYSQL connection fails. I am denied access ...the line in question is the following..mysql_connect (localhost,username,password) I have inserted my username and password without quotes. Should I be filling something into the localhost area.
  2. #2
  3. 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, username and password should ALL be in quotes, unless you are using variables to pass them to the function.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Miami, FL, USA
    Posts
    1
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
    host, username and password should ALL be in quotes, unless you are using variables to pass them to the function.[/quote]

    Where do I go to see what my host_server name, username. password is??

    I am new to php and to test it out I installed a script on my server. I go to the browser and point is to the admin index file. This is what I get;

    Warning: Unknown MySQL Server Host (dweb) (0) in lib.inc.php3 on line 124

    The original script came with "localhost" but that wasn't working either. Where should I look for the MySQL server host info? Shoul I also set up a username and password while there? How?

    Thank you for any help?



    ------------------
    Distributors Web
    Get Real.....Go Virtual!
    http://distributorsweb.com/sig
  6. #4
  7. 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
    Where is mysql located? If you have a host, they will tell you what your username and password are. If you set it up yourself then you have to create permissions and assign a username and password. See GRANT in the mysql manual. If localhost isn't working it means that you are running php and mysql on different machines. If so, you need to give the URL or IP address of the machine that mysql is on. Note also that you have to have permission to connect from a particular machine.

Similar Threads

  1. 'localhost' does not work
    By sparkrulez in forum Apache Development
    Replies: 4
    Last Post: August 26th, 2004, 08:25 PM
  2. Replies: 0
    Last Post: October 17th, 2003, 01: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, 05:17 PM
  4. Replies: 3
    Last Post: December 31st, 2002, 09:08 AM
  5. Replies: 2
    Last Post: August 27th, 2002, 10:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo