I don't know why this :
$dbh = new PDO('mysql:host=127.0.0.1:1812;dbname=nde_oldy-pn', 'root', '');
throw this exception :
PDO::__construct(): MySQL server has gone away
PDO::__construct(): Error while reading greeting packet
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away'
PDOException: SQLSTATE[HY000] [2006] MySQL server has gone away
YEAH !! I understand ! MySQL decided to go on a trip without me on his own command ! Grrrr!
I've tried everything on this page : MySQL Documentation (.5.2.9 MySQL server has gone away)
Context : It run with WAMP 3.0.6 (Apache 2.4.23; PHP 7.0.10; MySQL 5.7.14) Url like this :
localhost:1812/NDEfiveYEARSproject/index.php
httpd.conf like this :
Listen 12.34.56.78:1812
Listen 0.0.0.0:1812
Listen [::0]:1812
ServerName localhost:1812
my.ini like this :
port = 3306
key_buffer_size = 64M
max_allowed_packet = 200M
Yes 1812 and 3306 ports are open.
Yes Incoming and outbound traffic rules for each port (1812 and 3306) have been created
IIS is not running
Same for Skype and Teamviewer...