标签:row string ack semi ignore 说明 data column local
mysql_real_connect语法:
1
2 3 4 5 6 7 8 |
MYSQL * mysql_real_connect(MYSQL * mysql,
const char * host, const char * user, const char * passwd, const char * db, unsigned int port, const char * unix_socket, unsigned long flags); |
参数说明:
mysql - a mysql handle, which was previously allocated by mysql_init().
host - can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
user - the user name.
passwd - If provided or NULL, the server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password as provided or not).
db - if provided will specify the default database to be used when performing queries.
port - specifies the port number to attempt to connect to the server. 如果“port”不是0,其值将用作TCP/IP连接的端口号。port为0的话,使用mysql的默认tcp/ip端口3306.
unix_socket - specifies the socket or named pipe that should be used.
flags - the flags allows various connection options to be set:
标签:row string ack semi ignore 说明 data column local
原文地址:http://www.cnblogs.com/MakeView660/p/7452318.html