Results 1 to 5 of 5

Thread: Getting Database Info Correct

  1. #1
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default Getting Database Info Correct

    New to databases.

    Am I progressing these inputs correctly!!!!

    Instructions tell me to edit the following lines with my Database Info

    Code:
    $host = "localhost";
    $user = "root";
    $pass = "";
    $database = "test";
    I have carried out the edites as follows:

    Code:
    $host = "182.--.--.122";
    $user = "db11485--_fly1!";
    $pass = "iedpne 2--hmlo";
    $database = "db1148---_tuirt1!";
    based on the following that I have retrived from host:

    Server name: 182.--.--.122
    Database user name: db11485--_fly1!
    Password: "iedpne 2--hmlo"
    Database name: db1148---_tuirt1!

    Is the root thing correct?
    Last edited by djr33; 10-21-2011 at 09:34 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    For the security of your website, please do not post your passwords (or generally other security information like usernames, or even the IP). For the moment I've removed some information from each of the items.
    Please contact a moderator to have it removed entirely once the question has been answered.

    Everything looks correct, if that information is right.

    Sometimes the database is hosted locally, so you should use "localhost" instead of the IP-- but when they tell you an IP address, usually it means you should use that instead.

    The only detail that is a little strange is the password. It was given in this format:
    Password: "password"
    And the other items don't have quotation marks. So maybe those are actually part of the password:
    $pass = "\"iedpne 2--hmlo\"";
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default

    Thanks djr33, I note your comment on security.

    My hosting provider suggests a reason why I may not be getting a connection as follows -
    It looks like that your db details in dp.php file are incorrect, please find the error message below:

    PHP Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'db11485--_fly1!'@'182.--.--.122' (using password: YES) in C:\CustomerData\webspaces\webspace_001---80\wwwroot\test.we---ry.net\db.php on line 14.

    Line 14 is as follows:

    Code:
    $con=mysql_connect("$host","$user","$pass")or die("Connect Error: ".mysql_error()); $db="$database"; mysql_select_db($db, $con);
    Why might I be suffering from Access denied ??

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It's hard to say. The only thing I saw was that there were quotes around the password, so maybe those are actually part of it. Otherwise, just try various combinations to find one that works. Ask the host if they can give you a demo script. For example, some hosts might require mysqli functions (a little newer, a little more secure).
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default

    Hi djr33.

    Thanks for your assistance on this. It is now sorted. I should have been adding donate.pht to the end of the URL to the webspace to get the script to render.
    Last edited by Webiter; 10-26-2011 at 10:15 PM. Reason: Problem solved

Tags for this Thread

Bookmarks

Posting Permissions

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