keep getting this error can't fix it

Discussion in 'MySQL' started by mattonline, Jun 27, 2008.

  1. #1
    this is the error i keep getting

    Can't connect to the database. We get the following SQL Error: Unknown MySQL server host

    when i install my new phpfox script...
     
    mattonline, Jun 27, 2008 IP
  2. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #2
    Please let us know as to what MYSQL host you are using to connect to? You might be using incorrect MYSQL hostname or IP.
     
    MayurGondaliya, Jun 27, 2008 IP
  3. mattonline

    mattonline Active Member

    Messages:
    897
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #3
    i have just been putting localhost in

    how do i find my host name, i've always just put localhost in.
     
    mattonline, Jun 27, 2008 IP
  4. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Some servers will not work with localhost as the sql host, you have to actually put in the host name. do you have phpmyadmin? if you do open it up and it will tell you the hostname in the top.
     
    Neptune, Jun 27, 2008 IP
  5. mattonline

    mattonline Active Member

    Messages:
    897
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #5
    i have tried to use 127.0.0.1
    the actual IP address
    and non of it works....
     
    mattonline, Jun 27, 2008 IP
  6. Neptune

    Neptune Well-Known Member

    Messages:
    1,465
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Do you have phpmyadmin? that ip more then likely will not work. you need the actual host name.
     
    Neptune, Jun 27, 2008 IP
  7. MattC1983

    MattC1983 Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    the host is sometimes username.hostname.com
     
    MattC1983, Jun 28, 2008 IP
  8. mattonline

    mattonline Active Member

    Messages:
    897
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #8
    ooo ok, thanks will give that ago now...
     
    mattonline, Jun 28, 2008 IP
  9. David Pankhurst

    David Pankhurst Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #9
    Check your hosting company welcome email. Many use localhost but some (such as Godaddy) use a different name.
     
    David Pankhurst, Jun 28, 2008 IP
  10. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #10
    If you are not sure about host name, you will need to contact your hosting provider.

    Kailash
     
    kailash, Jun 28, 2008 IP
  11. mattonline

    mattonline Active Member

    Messages:
    897
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #11
    mattc1983 that worked, thanks :)
     
    mattonline, Jun 29, 2008 IP