The MySQL server. It can also include a port number. e.g. "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for the localhost.
If the PHP directive mysql.default_host is undefined (default), then the default value is 'localhost:3306'. In SQL safe mode, this parameter is ignored and value 'localhost:3306' is always used.
# preciser le port
Posté par NeoX . En réponse au message Connexion à 2 bases MySQL (3 et 4). Évalué à 0.
si tu ne precises pas, il va (par defaut) se connecter au 3306.
ca semble logique en plus, comment veux tu qu'il devine quel port utiliser si tu ne lui dis pas ?
plus d'info : http://fr.php.net/mysql_connect
resource mysql_connect ([ string $server [, string $username [, string $password [, bool $new_link [, int $client_flags ]]]]] )
[...]
server
The MySQL server. It can also include a port number. e.g. "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for the localhost.
If the PHP directive mysql.default_host is undefined (default), then the default value is 'localhost:3306'. In SQL safe mode, this parameter is ignored and value 'localhost:3306' is always used.