Specifying Program Options
232
--
protocol
[231 ]
Value
Connection Protocol
Permissible Operating
Systems
SOCKET
Unix socket file connection to local server
Unix only
PIPE
Named-pipe connection to local or remote server Windows only
MEMORY
Shared-memory connection to local server
Windows only
•
--shared-memory-base-name=name
[232]
On Windows, the shared-memory name to use, for connections made using shared memory to a
local server. The default value is
MYSQL
. The shared-memory name is case sensitive.
The server must be started with the
--shared-memory
[420]
option to enable shared-memory
connections.
•
--socket=file_name
[232]
,
-S file_name
On Unix, the name of the Unix socket file to use, for connections made using a named pipe to a local
server. The default Unix socket file name is
/tmp/mysql.sock
.
On Windows, the name of the named pipe to use, for connections to a local server. The default
Windows pipe name is
MySQL
. The pipe name is not case sensitive.
The server must be started with the
--enable-named-pipe
[407]
option to enable named-pipe
connections.
•
--ssl*
Options that begin with
--ssl
[607]
are used for establishing a secure connection to the server
using SSL, if the server is configured with SSL support. For details, see
Section 6.3.6.4, “SSL
Command Options”
.
•
--user=user_name
[232]
,
-u user_name
The user name of the MySQL account you want to use. The default user name is
ODBC
on Windows
or your Unix login name on Unix.
It is possible to specify different default values to be used when you make a connection so that you
need not enter them on the command line each time you invoke a client program. This can be done in
a couple of ways:
• You can specify connection parameters in the
[client]
section of an option file. The relevant
section of the file might look like this:
[client]
host=
host_name
user=
user_name
password=
your_pass
Section 4.2.3.3, “Using Option Files”
, discusses option files further.
• You can specify some connection parameters using environment variables. The host can be
specified for
mysql
using
MYSQL_HOST
. The MySQL user name can be specified using
USER
(this
is for Windows and NetWare only). The password can be specified using
MYSQL_PWD
, although this
is insecure; see
Section 6.1.2.1, “End-User Guidelines for Password Security”
. For a list of variables,
see
Section 2.21, “Environment Variables”
.
4.2.3. Specifying Program Options
There are several ways to specify options for MySQL programs:
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...