mysql-native v3.0.0

API Reference Home: [This Version] [Latest Version] [Other Versions]


Function Connection.parseConnectionString

Parses a connection string of the form "host=localhost;port=3306;user=joe;pwd=pass123;db=myappsdb"

static string[] parseConnectionString (
  string cs
);

Port is optional and defaults to 3306.

Whitespace surrounding any name or value is automatically stripped.

Returns a five-element array of strings in this order:

(TODO: The connection string needs work to allow for semicolons in its parts!)