DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) mysql_connect

Info Catalog (mysql.info.gz) mysql_close (mysql.info.gz) C API functions (mysql.info.gz) mysql_create_db
 
 22.2.3.5 `mysql_connect()'
 ..........................
 
 `MYSQL *mysql_connect(MYSQL *mysql, const char *host, const char *user,
 const char *passwd)'
 
 Description
 ...........
 
 This function is deprecated.  It is preferable to use
 `mysql_real_connect()' instead.
 
 `mysql_connect()' attempts to establish a connection to a MySQL
 database engine running on `host'.  `mysql_connect()' must complete
 successfully before you can execute any of the other API functions,
 with the exception of `mysql_get_client_info()'.
 
 The meanings of the parameters are the same as for the corresponding
 parameters for `mysql_real_connect()' with the difference that the
 connection parameter may be `NULL'. In this case the C API allocates
 memory for the connection structure automatically and frees it when you
 call `mysql_close()'. The disadvantage of this approach is that you
 can't retrieve an error message if the connection fails.  (To get error
 information from `mysql_errno()' or `mysql_error()', you must provide a
 valid `MYSQL' pointer.)
 
 Return Values
 .............
 
 Same as for `mysql_real_connect()'.
 
 Errors
 ......
 
 Same as for `mysql_real_connect()'.
 
Info Catalog (mysql.info.gz) mysql_close (mysql.info.gz) C API functions (mysql.info.gz) mysql_create_db
automatically generated byinfo2html