I want to run MYSQL from the command line, as in mysql -u root -p but it returns -bash: mysql: command not found So, need to install it, I think. But then what application exactly do I need to. The issue: On Mac OS when we installed MySQL successfully and tried to access it from command line we got into this issue. Can't access mysql from command line. To start MySQL on Mac, you can use the command line. The commands you use depend on which version of MySQL you have: either before 5.7 or 5.7 and newer. Version 5.7 came out in October 2015, so if you’ve downloaded it anytime in the last few years it’s most likely after 5.7. And press Enter. And here is the MySQL CLI, And here is the MySQL CLI, the command-line interface for MySQL. The command-line interface for MySQL. I have this little prompt at the bottom here I.
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.
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:
Mysql Command Line Download For Mac
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/
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.



The easiest way would be to install mysql server or workbench, copy the mysql client somewhere, update your path settings and then delete whatever you installed to get the executable in the first place.
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:
export PATH=”/usr/local/mysql/bin:$PATH
This will let you run “mysql” from anywhere as you.

Open the “MySQL Workbench” DMG file and
Eject the DMG disk
Tried mysql utilities but didn’t work for one MacOS. Finally went with Sequel Pro http://sequelpro.com/. This does not exactly address the ‘no gui’ requirement of the question but that’s what I also started out with.
Mysql Command Line Connect Mac
Tags: mysql, sql
