Hi I have a site develop in cakephp. I want to connect my cakephp to a database with an ip because me and my friends working together into the same network My ip is:192.168.0.3 Ip of database into the second pc: 192.168.0.4
I can ping 192.168.0.4 Into the second pc running xampp mysql into the system.
This is my database configuration:
public $default = array (
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '192.168.0.4',
'login' => 'login',
'password' => 'password',
'database' => 'database',
'prefix' => ''
);
But gives me an error: Error: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '192.168.0.4' (10061) requires a database connection ANd into the second pc this error: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 61 requires a database connection
Pc1 and pc2 doesn't work but, if pc2 (where is located database) write into database config into the host: localhost, it works. Me not. How can I solve that?
'host' => '192.168.0.4:port'? - petervaz