affected by it, specify your password in an option file (see Section 4.2.2.2, “Using Option Files” ). Another workaround is to change your MySQL password to a value that has eight or fewer characters, but that has the disadvantage that shorter passwords tend to be less secure. 

Client programs determine what type of connection to make as follows: 

•If the host is not specified or is localhost , a connection to the local host occurs: 

•On Windows, the client connects using shared memory, if the server was started with the shared_memory  system variable enabled to support shared-memory connections. 

•On Unix, MySQL programs treat the host name localhost  specially, in a way that is likely different from what you expect compared to other network-based programs: the client connects using a Unix socket file. The --socket  option or the MYSQL_UNIX_PORT  environment variable may be used to specify the socket name. 

•On Windows, if host  is .  (period), or TCP/IP is not enabled and --socket  is not specified or the host is empty, the client connects using a named pipe, if the server was started with the named_pipe system variable enabled to support named-pipe connections. If named-pipe connections are not supported or if the user making the connection is not a member of the Windows group specified by the named_pipe_full_access_group  system variable, an error occurs. 

•Otherwise, the connection uses TCP/IP. 

The --protocol  option enables you to use a particular transport protocol even when other options normally result in use of a different protocol. That is, --protocol  specifies the transport protocol explicitly and overrides the preceding rules, even for localhost . 

Only connection options that are relevant to the selected transport protocol are used or checked. Other connection options are ignored. For example, with --host=localhost  on Unix, the client attempts to connect to the local server using a Unix socket file, even if a --port  or -P  option is given to specify a TCP/IP port number. 

To ensure that the client makes a TCP/IP connection to the local server, use --host  or -h  to specify a host name value of 127.0.0.1  (instead of localhost ), or the IP address or name of the local server. You can also specify the transport protocol explicitly, even for localhost , by using the -- protocol=TCP  option. Examples: 

mysql --host=127.0.0.1 mysql --protocol=TCP 

If the server is configured to accept IPv6 connections, clients can connect to the local server over IPv6 using --host=::1 . See Section 5.1.13, “IPv6 Support” . 

On Windows, to force a MySQL client to use a named-pipe connection, specify the --pipe  or -- protocol=PIPE  option, or specify .  (period) as the host name. If the server was not started with the named_pipe  system variable enabled to support named-pipe connections or if the user making the connection is not a member of the Windows group specified by the named_pipe_full_access_group system variable, an error occurs. Use the --socket  option to specify the name of the pipe if you do not want to use the default pipe name. 

Connections to remote servers use TCP/IP. This command connects to the server running on remote.example.com  using the default port number (3306): 

mysql --host=remote.example.com 

To specify a port number explicitly, use the --port  or -P  option: 

mysql --host=remote.example.com --port=13306 

