Engine23

MySQL - mysql command not found

On Mac, if you use terminal and type

$ mysql

And you get the response

$mysql command not found

open up your editor like vim and save this to your bash profile

$ cd ~ $ vim .bash_profile

PATH=${PATH}:/usr/local/mysql/bin

Save and restart Finder

In your top toolbar locate the apple icon, and go to force quit and choose Finder

You will then be able to restart Finder which in tern reloads your bash profile and now, you can use mysql as a command

$ mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.19 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Share: