AXISHK
asked on
PHP connection to mySQL
I have setup a PHP /MySQL in my internal network. The server can be access through a IP http://10.1.3.3. I can also access to MySQL using mySQL Workbench installed in my PC.
In my PHP statement, if replace the server "localhost" with the actual IP address, the php page can't connect and return with a error :
Any idea why does it happen ?
Connection error: Can't connect to MySQL server on '10.1.3.3' (4)
Thx
In my PHP statement, if replace the server "localhost" with the actual IP address, the php page can't connect and return with a error :
Any idea why does it happen ?
Connection error: Can't connect to MySQL server on '10.1.3.3' (4)
Thx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Root@localhost is not the same as root@%
It depends on which rights you grant to the root@%
Though usually it is best to use a separate dedicate account for the php application that has a limited scope and can only access specific databases.