TL;DR Edit /usr/local/etc/my.cnf/usr/local/etc/my.cnf and at the end add `bind-address=*`
So I've just done a clean install on my machine (added an SSD drive) along with a change from MySQL to Maria DB which I used Homebrew for. All was good until I went to connect (from Docker) using the machines IP address (192.168.0.1), at which point I was greated with
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.1' (61 "Connection refused")
After digging around Google, and creating/editing my.cnf files I knew my problem was with
bind-address. I even looked at editing the Homebrew plist
homebrew.mxcl.mariadb.plist but nothing was working. So, back to RTFM I went and found out that
* is accepted, so a quick edit to
/usr/local/etc/my.cnf/usr/local/etc/my.cnf and at the end I added
bind-address=*. Restarted the services and all is working.
The main problem stems from Homebrew setting
--bind-address=127.0.0.1 in homebrew.mxcl.mariadb.plist so you could even change it there but I prefer having it in the my.cnf file to its easy to find later.