JChao JChao - 4 years ago 88
SQL Question

I have multiple MySql installed on my machine, how do I choose which one to use?

Title is a little confusing, but I installed mysql using brew, and somehow there's another one when I

which mysql

which shows
. I assume that's another installment

I'm trying to use the brew one when I just type in
with more commands followed. How do I do it?

Answer Source

You can add the path for the MySQL instance you want to run to your PATH variable. If your shell is bash then you can add the MySQL path to your .bashrc file:


You should also remove any other MySQL instances you see in the PATH. Now next time when you use mysql from the command line Linux should pick up on the one you added to the PATH.

Read the MySQL documentation for more information.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download