![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461962193.webp)
C API Function Descriptions
2173
Option
Description
local-infile[={0|1}]
If no argument or nonzero argument, enable use of
LOAD DATA
LOCAL
; otherwise disable.
max_allowed_packet=bytes
Maximum size of packet that client can read from server.
multi-queries
,
multi-
results
Enable multiple result sets from multiple-statement executions or
stored procedures.
multi-statements
Enable the client to send multiple statements in a single string
(separated by “
;
”).
password=password
Default password.
pipe
Use named pipes to connect to a MySQL server on Windows.
port=port_num
Default port number.
protocol={TCP|SOCKET|
PIPE|MEMORY}
The protocol to use when connecting to the server.
return-found-rows
Tell
mysql_info()
to return found rows instead of updated rows
when using
UPDATE
.
shared-memory-base-
name=name
Shared-memory name to use to connect to server.
socket=path
Default socket file.
ssl-ca=file_name
Certificate Authority file.
ssl-capath=path
Certificate Authority directory.
ssl-cert=file_name
Certificate file.
ssl-cipher=cipher_list
Permissible SSL ciphers.
ssl-key=file_name
Key file.
timeout=seconds
Like
connect-timeout
.
user
Default user.
timeout
has been replaced by
connect-timeout
, but
timeout
is still supported in MySQL 5.0 for
backward compatibility.
For more information about option files, see
Section 4.2.3.3, “Using Option Files”
.
Return Values
Zero for success. Nonzero if you specify an unknown option.
Example
The following
mysql_options()
calls request the use of compression in the client/server protocol,
cause options to be read from the
[odbc]
group of option files, and disable transaction autocommit
mode:
MYSQL mysql;
mysql_init(&mysql);
mysql_options(&mysql,MYSQL_OPT_COMPRESS,0);
mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"odbc");
mysql_options(&mysql,MYSQL_INIT_COMMAND,"SET autocommit=0");
if (!mysql_real_connect(&mysql,"host","user","passwd","database",0,NULL,0))
{
fprintf(stderr, "Failed to connect to database: Error: %s\n",
mysql_error(&mysql));
}
This code requests that the client use the compressed client/server protocol and read the additional
options from the
odbc
section in the
my.cnf
file.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...