How to install Mysql 5.8 via Homebrew on MacOS Catalina (10.15.3) in 2020

only half of the tabs
  1. In Terminal, run:
    brew install mysql
  2. Go to my.cnf file and in section [mysqld] add line:
    default-authentication-plugin=mysql_native_password
  3. mysql -uroot to log into mysql
  4. then inside shell execute this command:
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[password]';

I'd like 3 hours of my life back, please.