Updated connection string to pass port

Also added namespacing for PDO exception