From 2eabce8ccd75b3f171a77ca194302e7fbeea39a4 Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Mon, 3 Oct 2005 10:37:09 +0000 Subject: [PATCH] more examples for connecting with different syntax, link to client flags table, link to ini-setting git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@197436 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysql/functions/mysql-connect.xml | 60 ++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/reference/mysql/functions/mysql-connect.xml b/reference/mysql/functions/mysql-connect.xml index 24446ce932..df2404b621 100644 --- a/reference/mysql/functions/mysql-connect.xml +++ b/reference/mysql/functions/mysql-connect.xml @@ -1,5 +1,5 @@ - + mysql_connect @@ -80,6 +80,7 @@ MYSQL_CLIENT_COMPRESS, MYSQL_CLIENT_IGNORE_SPACE or MYSQL_CLIENT_INTERACTIVE. + Read the section about for further information. @@ -152,6 +153,61 @@ if (!$link) { echo 'Connected successfully'; mysql_close($link); ?> +]]> + + + + + + <function>mysql_connect</function>example using <literal>hostname:port</literal> syntax + + +]]> + + + + + + <function>mysql_connect</function>example using ":/path/to/socket" syntax + + ]]> @@ -168,7 +224,7 @@ mysql_close($link); Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as - mysql.default_host in your PHP configuration and leave the server field + in your PHP configuration and leave the server field blank.