You get the error establishing databases because you have the host defined as “localhost”, not “Localhost”. For some reason OSX only recognizes it with the capital “L”. Do it with the capital “Localhost” and you won’t get that database connection error.
Thanks for publishing your fix. This has saved me a great deal of (more) time. Props to you.