I have sucessfully installed PHP 4, mySQL, and IIS on my Win2k box. I tested all three parts seperately (running a sample php script, using mySQL from the commmand line, and accessing IIS through IE.), and they work fine seperately. The mysql-nt.exe server is running as a windows NT service.
However, I have problems connecting to mySQL using PHP. I have given execute permissions to php.exe and it works fine.
I created a database in the command line using this:
mysqladmin create newsDB --host="192.168.1.1" --user="jason" --password="something"
I can access that database perfectly fine in the command line, but in the PHP script, I write:
$hostname="192.168.1.1";
$user="jason";
$password="something";
$which_db="newsBD";
mysql_pconnect($hostname, $user, $password);
mysql_select_db($which_db);
I get an error that says: You don't have permission to jason@kymira (Using password="YES")
(kymira being my computer's name)
Then I tried this after seeing it in someone else's code:
mysql_pconnect($hostname, $user, "");
mysql_select_db($which_db);
Now, I can connect to mySQL, but I can't select which database to use. The mySQL error logs says the connection was aborted because of unknown causes.
Do I have to change the permissions on the mysql directoy? Any help is much appreciated.