Failure to install mysql on macOS Mojave
MySQL 8 makes big changes compared with previous version 5.7. Downgrading directly to the lower version 5.7 from 8.x won't work.

Solution: 


Uninstall all MySQLs you've installed. 
Since you're setting up a new machine, there's no existing database. Just clean up the broken database.

# brew-installed mysql
rm -rf /usr/local/var/mysql

# db from the official installed
# should be located at /usr/local/mysql (I'm not very sure)
ls -ald /usr/local/*mysql*
# then delete any folders listed by ls

You'd better remove the conf file /usr/local/etc/my.cnf as well.
Reinstall MySQL.