wp-cli/wp-cli — pull request #562 by eugeneware (2013-06-26 01:55:56+00:00)
Title: support for port and socket configurations with wp core config

Currently there is no way to use the `wp core config` command with a mysql server with a custom socket or TCP port. This is because the `run_mysql_query` doesn't process `dbhost` values with port or custom socket parameters.

This PR parses out an optional port or socket parameter when testing the connection.

For example

```
$ wp core config --dbname=testwordpress --dbuser=root --dbhost=localhost:/tmp/mysql.wordpress.sock
$ wp core config --dbname=testwordpress --dbuser=root --dbhost=localhost:4000
```