A DNS SRV name consists of a service, protocol, and domain, with the service and protocol each prefixed by an underscore: 

_ service ._ protocol . domain 

The following DNS SRV record identifies multiple candidate servers, such as might be used by clients for establishing X Protocol connections: 

Name TTL Class Priority Weight Port Target _mysqlx._tcp.example.com. 86400 IN SRV 0 5 33060 server1.example.com. _mysqlx._tcp.example.com. 86400 IN SRV 0 10 33060 server2.example.com. _mysqlx._tcp.example.com. 86400 IN SRV 10 5 33060 server3.example.com. _mysqlx._tcp.example.com. 86400 IN SRV 20 5 33060 server4.example.com. 

Here, mysqlx  indicates the X Protocol service and tcp  indicates the TCP protocol. A client can request this DNS SRV record using the name _mysqlx._tcp.example.com . The particular syntax for specifying the name in the connection request depends on the type of client. For example, a client might support specifying the name within a URI-like connection string or as a key-value pair. 

A DNS SRV record for classic protocol connections might look like this: 

Name TTL Class Priority Weight Port Target _mysql._tcp.example.com. 86400 IN SRV 0 5 3306 server1.example.com. _mysql._tcp.example.com. 86400 IN SRV 0 10 3306 server2.example.com. _mysql._tcp.example.com. 86400 IN SRV 10 5 3306 server3.example.com. _mysql._tcp.example.com. 86400 IN SRV 20 5 3306 server4.example.com. 

Here, the name mysql  designates the classic MySQL protocol service, and the port is 3306 (the default classic MySQL protocol port) rather than 33060 (the default X Protocol port). 

When DNS SRV record lookup is used, clients generally must apply these rules for connection requests (there may be client- or connector-specific exceptions): 

•The request must specify the full DNS SRV record name, with the service and protocol names prefixed by underscores. 

•The request must not specify multiple host names. 

•The request must not specify a port number. 

•Only TCP connections are supported. Unix socket files, Windows named pipes, and shared memory cannot be used. 

For more information on using DNS SRV based connections in X DevAPI, see Connections Using DNS SRV Records. 

## 4.2.7 Connection Transport Protocols 

For programs that use the MySQL client library (for example, mysql  and mysqldump ), MySQL supports connections to the server based on several transport protocols: TCP/IP, Unix socket file, named pipe, and shared memory. This section describes how to select these protocols, and how they are similar and different. 

•Transport Protocol Selection 

•Transport Support for Local and Remote Connections 

•Interpretation of localhost 

•Encryption and Security Characteristics 

•Connection Compression 

