James MV
James MV

Reputation: 8717

Brew older version of mysql not available at cmd line

I've installed mysql 5.7 via brew. The binary files are installed at /usr/local/opt/mysql\@5.7/bin/ however I can't access these files as this location isn't in my path.

Is there a brew way to fix this rather than me making symlinks around the system myself?

Upvotes: 0

Views: 555

Answers (2)

Bernie B
Bernie B

Reputation: 429

The simple "brew way" to do this is answered here

$ brew info mysql (to get info about the installed versions)
$ brew switch mysql 5.7.21 (to switch to a stable version)

Upvotes: 0

bfontaine
bfontaine

Reputation: 19829

The Homebrew way of "fixing" this is to use link --force:

brew link --force [email protected]

Alternatively, you can add this location to your $PATH by modifying it in your ~/.bashrc or ~/.bash_profile:

export PATH="$(brew --prefix [email protected]):$PATH"

Upvotes: 3

Related Questions