Wiki documentation for Homebrew needs some updating. As starting from scratch at least version 10.7 and user wants to login as root then user needs to do
sudo mysql -u root
To login as root thru socket. I does not work just try to login `mysql -u root -p` and enter anymore. This affects running `mariadb-secure-install` for example.