PDA

View Full Version : help!!!


digitalp
07-01-2005, 08:03 PM
Hi,

I am trying to install Pixelpost for the first time. I have checked all the requirements, etc, and have the SQL databases set up fine. However, I am still getting this error:

Error: Access denied for user: 'digitalp_emily@localhost' to database 'digitalp_photo'

Here is what I have set up in the pixelpost.php file:

$pixelpost_db_host = "localhost"; // database host, often "localhost"
$pixelpost_db_user = "digitalp_emily"; // database user
$pixelpost_db_pass = "***** // database user password
$pixelpost_db_pixelpost = "digitalp_photo"; // database

$pixelpost_db_prefix = "pixelpost_"; // table prefix, leave as is unless you want to install multiple blogs on the same database


I am trying to set up in a folder off of my main site. Is that the problem?
Any help would be greatly appreciated!

Connie
07-01-2005, 08:37 PM
you should never never post any database passwords etc. here or anywhere else!

that's why I edited it!!!

you have a problem with the database, but what do you mean with "folder off of your main site"?

digitalp
07-01-2005, 08:51 PM
I meant to edit that, I'm so sorry!!!

I mean like:

url.com/photos

or something similar.

thanks :)

Connie
07-01-2005, 09:31 PM
ok, I understand
it is very normal and unproblematic to install PixelPost into a subdirectory of your html-directory
this for sure is not the reason for the problem, your problem is the connection to the database

do the following:

copy the following code
replace "localhost,database user,database userpassword" with the data you use as database data

save it as "dbconnect.php"
upload this to your website
call it in the browser

read the result

<?php
// check if database can be connected
$db_link = mysql_connect(localhost,database user,database userpassword);
if($db_link) {
echo "Database could be connected!<br />\n";
} else {
echo "database could not be connected";
}
// now we list all databases

echo "now we list all the databases: <br />";
$dbs=mysql_list_dbs();
$ndbs=mysql_num_rows($dbs);
$i = 0;
while ($i<$ndbs)
{
$dbname = mysql_dbname($dbs,$i); // <-- hier
echo "<br>dbname[$i] = $dbname";
$i++;
}
?>

1) if the database can be connected, great
2) if there are databases active, they will be listed
3) if the databases are listed, is there a database digitalp_photo?

1 = you have the wrong connection data
2 = you have used wrong database name

check it out

example: I get this result at one of my webspaces:
http://www.bildgier.de/test/dbconnect.jpg

digitalp
07-01-2005, 09:59 PM
I got it to work!

Thanks for all of your help, Connie! I greatly appreciate it!

Connie
07-01-2005, 10:00 PM
I knew it will work! It's mostly typos or something...

but now you give some revenge: show us nice, interesting or just plain good photos :lol: