View Full Version : Getting Database Info Correct
Webiter
10-21-2011, 08:34 PM
New to databases.:confused:
Am I progressing these inputs correctly!!:o!!
Instructions tell me to edit the following lines with my Database Info
$host = "localhost";
$user = "root";
$pass = "";
$database = "test";
I have carried out the edites as follows:
$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?:o
djr33
10-21-2011, 09:42 PM
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\"";
Webiter
10-22-2011, 07:00 PM
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. :confused:
Line 14 is as follows:
$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 ?:mad:?
djr33
10-22-2011, 09:24 PM
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).
Webiter
10-25-2011, 01:49 PM
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.:o
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.