Question or issue on macOS:
MySQL Enterprise Edition includes the most comprehensive set of advanced features, management tools and technical support for MySQL. Customer Download ». Trial Download ». MySQL, a database management system, allows any user to freely collect, store, and interpret vast amounts of data on any network. MySQL will operate with any Mac operating system versions 10.2 higher. However, it's crucial to download the proper M.
I want to install the MySQL client for the command line, not a GUI. I have searched over the web but only found instructions on installing the MySQL server.
How to solve this problem?
As of this article update the latest release of MySQL Workbench is version 8. There are many new features in this release which can be checked on MySQL Workbench 8.0 Release notes. To download the latest MySQL Workbench 8 for macOS visit the official downloads page. You can use DBngin to install MySQL on Mac. It allows you to set up a local database server of any versions within a click, no coding, no configuration required.
Solution no. 1:
install MySQLWorkbench, then
Solution no. 2:
If you have already installed MySQL from the disk image (dmg) from http://dev.mysql.com/downloads/), open a terminal, run:
then, reload .bash_profile by running following command:
You can now use mysql to connect to any mysql server:
Credit & Reference: http://www.gigoblog.com/2011/03/13/add-mysql-to-terminal-shell-in-mac-os-x/
Solution no. 3:
Best option is:
Solution no. 4:
Mysql has a client-only set of utilities:
Mysql client shell
https://dev.mysql.com/downloads/shell/
Other command line utilities
https://dev.mysql.com/downloads/utilities/
Mac OSX version available.
Solution no. 5:
This strictly installs a command line client, without the other overhead:


Install Homebrew (if you don’t have it):
How To Download Mysql For Mac Big Sur
Then, install mysql-client:
Then, add the mysql-client binary directory to your PATH:
Finally, reload your bash profile:
Then you should be able to run mysql in a terminal, if not try opening a new terminal
Solution no. 6:
There is now a mysql-client formula.
brew install mysql-client
Solution no. 7:
For installing mysql-shell with homebrew, run
you can then launch the mysql shell with
if you want to enter SQL mode directly, run
Solution no. 8:
Open the “MySQL Workbench” DMG file and
Eject the DMG disk
Solution no. 9:
If you installed from the DMG on a mac, it created a mysql client but did not put it in your user path.
Add this to your .bash_profile:
How To Download Mysql For Mac Operating System
This will let you run mysql from anywhere as you.
Solution no. 10:
Installation command from brew:
Install Mysql In Mac
Look at what you can do:
How To Download Mysql On Mac Terminal
Run query from mysqlsh client installed: