There is a computer and laptop in the same network through the router. Nout wi-fi, PC - directly cable from the router. See each other, all the rules. On the laptop there is a database whose data is constantly changing, so you need to connect to it from a PC. Through Navicat added a new user user@192.168.0.86 (client ip) with all rights (global previlegas). Now on the PC (client) I make a request to connect to the database with the indication of the host - Ip laptop in the end I get:
Warning: mysql_connect (): An attempt to establish a connection was unsuccessful, because The required response was not received from the other computer within the required time, or the already established connection was terminated due to the incorrect response of the already connected computer.
PHP code:
define('DB_HOST','192.168.0.46'); define('DB_USER','user'); define('DB_NAME','db_name'); define('DB_PAS','password'); $dbh=mysql_connect(DB_HOST,DB_USER,DB_PAS) or die(mysql_error()); mysql_query('SET NAMES utf8'); mysql_select_db(DB_NAME); Can someone tell me what else needs to be done? Why not come?
issue resolved with firewall blocking and my.ini settings.