On Feb 13, 2008 10:52 AM, Rudy sleiman <[EMAIL PROTECTED]> wrote:
> To whom it may concern
> I'm working on a network, i don't have internet access and the
> application i'm working on is not published online.
> Platform used: PHP with MySQL.
> The Database is created on PC A... I'm working on PC B... and my
> problem is that i am not able to connect to the PC A Database using
> the IP address as a host (since the database is not on my machine).
> but if i'm on PC A i can connect with the localhost.
> The question is that: do i need any configuration so i can access the 
> database?

    What error message is being kicked out by PHP when you do
mysql_connect() or mysql_query() with an `or die(mysql_error())`

    Ensure that the firewall is allowing remote connections to port
3306 on PC A.  If it is, then the problem is likely in the MySQL
internal permissions.  If that's the case, do the following
(substituting your info in place).

    As root (or another authorized user of the database you want to use):
        USE database_name;
        GRANT ALL ON database_name TO database_username@'%' IDENTIFIED
BY 'zxcvbnm';

    Replace database_name with the name of your database; replace
database_username with a username of your choice (doesn't have to be
an existing account, MySQL will create it on the fly); replace '%'
with the hostname/IP of PC B (using single-quotes around it) or leave
it as '%' (with the quotes) to allow ALL hosts (wildcard); replace
'zxcvbnm' (with quotes) with a password of your choice.


Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to