Can’t connect to local MySQL server error with MariaDB and Homebrew

A possible fix if you're running into this error.