Expectation: mysql -uroot command from instructions log me in.
Actual: It doesn't work. There's some password that I don't know.
Tejass-MacBook-Pro:presto tejas$ brew install mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.17.el_capitan.bottle.1.tar.gz
Already downloaded: /Users/tejas/Library/Caches/Homebrew/mysql-5.7.17.el_capitan.bottle.1.tar.gz
==> Pouring mysql-5.7.17.el_capitan.bottle.1.tar.gz
==> Using the sandbox
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
To connect run:
mysql -uroot
To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
馃嵑 /usr/local/Cellar/mysql/5.7.17: 321 files, 234.4M
Tejass-MacBook-Pro:presto tejas$ mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
You will have had an existing database with an existing password there. To remove all your data and start again run brew services stop mysql; pkill mysqld; rm -rf /usr/local/var/mysql/; brew postinstall mysql; brew services restart mysql
@MikeMcQuaid , thank you for this.
@ldco2016 Thanks for the kind words!
Most helpful comment
You will have had an existing database with an existing password there. To remove all your data and start again run
brew services stop mysql; pkill mysqld; rm -rf /usr/local/var/mysql/; brew postinstall mysql; brew services restart mysql