Custom port option for database connection

I use MAMP for local development which runs MySQL on port `8889` rather than the standard `3306`. This PR adds the option to specify a custom port for the database connection. Hopefully it will help others in a similar situation.