Home>
Things to solve
  • I want to use Mysql5.7
  • Command not found even after installing.
$mysql --version
-bash: mysql: command not found
Environment

Mac OX 10.11.4 (El Captain)

Tried
$brew reinstall [email protected]
==>Reinstalling [email protected]
==>Downloading https://homebrew.bintray.com/bottles/[email protected]_capitan
Already downloaded: /Users/oogw/Library/Caches/Homebrew/[email protected]_capitan.bottle.tar.gz
==>Pouring [email protected]_capitan.bottle.tar.gz
==>Caveats
We've installed your MySQL database without a root password.To secure it run:
    mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
    mysql -uroot
[email protected] is keg-only, which means it was not symlinked into/usr/local,
because this is an alternate version of another formula.
If i need to have [email protected] first in your PATH run:
  echo 'export PATH = "/ usr/local/opt/[email protected]/bin: $PATH"'>>~/.bash_profile
For compilers to find [email protected] you may need to set:
  export LDFLAGS = "-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS = "-I/usr/local/opt/[email protected]/include"
For pkg-config to find [email protected] you may need to set:
  export PKG_CONFIG_PATH = "/ usr/local/opt/[email protected]/lib/pkgconfig"

To have launchd start mysq[email protected] now and restart at login:
  brew services start [email protected]
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/[email protected]/bin/mysql.server start
==>Summary