Installation problem - Mac safari

Hello, I get stuck on step 3. I have created a db, and assigned a username, but when I put in the information, it tells me: Failed to connect to database with data you provided.

I have entered the following info:

host name: localhost
username: "db user name"
Password: "db user password"
Database name: "db name"
Table prefix: Here I have used pp_, the prefix that comes with my server, and also have left it empty. None of these 3 seem to work.

I can't go past this step!

I'm using safari in a Mac, but I also tried FF... Am I doing something wrong? Can anyone help?

Thanks,

F.

Hello evocreative,

first of all, the internet browser you use have nothing to do with that, don't worry about this. :)

Did you create the database in MySQL first? If not, you need to do that. Ok, re-reading your post, it seems you did, but I would double-check the spelling.

If that's not the problem, I would check that the hostname, username and password you're giving are correct.
One way to do that is to copy the following code in a new file and access it from your webserver:

<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!
$link) {
    die(
'Could not connect: ' . mysql_error());
}
echo
'Connected successfully';
mysql_close($link);
?>

(from http://us.php.net/manual/en/function.mysql-connect.php)
don't forget to replace "localhost", "mysql_user" and "mysql_password" with the value for your server obviously.

If this bit is successful, I don't think there is any reason for ProjectPier not to be able to do so too. (except for the database issue mentionned above)

You can also try the first example of this page http://us.php.net/manual/en/function.mysql-select-db.php, that will try to connect to the specific database after connecting to the server.

Also, do you know if your MySQL server is running on the default port? I can't remember how ProjectPier handles that, but I suppose just putting "localhost:4556" as hostname would work (where 4556 would be the port used by your server).

I suggest you try these different things and we'll go from there if you still have troubles.

Tim

Tried your steps above and everything seems to check out when I run the test file. I can't figure this one out. I'm running on MediaTemple, so the host server isn't localhost, but I'd gotten other php applications up and running without any problems (wp blog, zenphoto, modx).

Have you tried using 127.0.0.1 in stead of localhost?

It's just one of the odd things with Apple's Apache/Mysql on 10.5 on my setup. Localhost works fine except for Mysql connections. Keep in mind that i've been using this setup for two years, so it might be because of some long forgotten experiment ,-)