brew install mysql@5.7
https://laravel.com/docs/6.x/valet#installation
brew services restart mysql@5.7
brew services start mysql@5.7
brew services stop mysql@5.7
brew services list
brew link mysql@5.7 --force
https://stackoverflow.com/questions/33268389/what-does-brew-link-do
Creates symlinks to installations you performed manually in Cellar. This allows you to have the flexibility to install things on your own but still have those participate as dependencies in homebrew formulas.
brew unlink mysql@5.7
/usr/local/var/mysql
ln -s "/my-dropbox/path/mysql" "/usr/local/var/mysql"
After running brew install mysql@5.7
this error appeared.
brew link mysql@5.7 --force
$ brew link mysql@5.7 --force
Linking /opt/homebrew/Cellar/mysql@5.7/5.7.39... 87 symlinks created.
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc
mysql -u root -p
show databases;
mysql
SELECT @@datadir, @@innodb_data_home_dir
https://stackoverflow.com/questions/9695362/macosx-homebrew-mysql-root-password
$ brew services stop mysql
$ pkill mysqld
$ rm -rf /usr/local/var/mysql/ # NOTE: this will delete your existing database!!!
$ brew postinstall mysql
$ brew services restart mysql
$ mysql -uroot
brew services stop mysql@5.7
brew uninstall mysql@5.7
pkill mysqld
rm -rf /usr/local/var/mysql/ # NOTE: this will delete your existing database!!
rm -rf /usr/local/var/mysql
rm /usr/local/etc/my.cnf
brew install mysql@5.7
brew link --force mysql@5.7
brew services restart mysql@5.7
brew link mysql@5.7 --force
mysql -u root -p