First uninstall mysql
brew uninstall mysql@5.7
Delete the folders/files that were not removed
rm -rf /usr/local/var/mysql
rm /usr/local/etc/my.cnf
Reinstall mysql and link it
brew install mysql@5.7
brew link --force mysql@5.7
Enable and start the service
brew services start mysql@5.7