2.2 Connection Parameters

To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and perhaps also port or socket.

Whenever connection parameters are required, they can be specified three different ways:

When providing the connection parameters as a dictionary, the parameters are passed unchanged to the connector's connect function. This enables you to pass parameters not supported through the other interfaces, but at least these parameters are supported:

Providing the connection parameters as a string requires the string to have the format user[:passwd]@host[:port][:socket], where some values are optional. If a connection specification string is provided, it is parsed using the options.parse_connection function.