mysql command not found (Mac issue?)

Posted on 2009-07-03
Last Modified: 2013-12-21

I'm trying to load a schema for a programme called biosql.

I have created a database called "biosql" in MySQL, but i'm trying to load the biosql-schema/sql in MySQL with the command:

>mysql -u root biosql < biosqldb-mysql.sql

The "biosqldb-mysql.sql file is currently located on my mac in:

I have created a .profile for my mysql commands with the script:

export PATH=/usr/local/mysql-5.1.35-osx10.5-x86/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH

i try the command:

bash-3.2# mysql -u root biosql < biosqldb-mysql.sql
bash: mysql: command not found

Any help would be greatly appreciated.

Question by:StephenMcGowan
  • 3
  • 2

Author Comment

ID: 24774563
I think the issue is that when i type "mysql" the OS doesn't know where MySQL is located.

I currently have MySQL saved in the directory:


(folders in this location are mysql      and   mysql-5.1.36-osx10.5-x86

with the $PATH (in .profile) set as:

export PATH=/usr/local/mysql-5.1.35-osx10.5-x86/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH

Is there something i need to modify?


Author Comment

ID: 24774589
in fact i have mysql saved in /usr/local/mysql-5.1.36-osx10.5-x86/bin

with the $PATH (in .profile) set as:

export PATH=/usr/local/mysql-5.1.35-osx10.5-x86/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH

still receiving:

bash-3.2# mysql -u root biosql < biosqldb-mysql.sql
bash: mysql: command not found


LVL 40

Expert Comment

ID: 24778979
what do you get when you run

find / -name mysql

which mysql

Author Comment

ID: 24779174
bash-3.2# find / -name mysql

LVL 40

Accepted Solution

omarfarid earned 500 total points
ID: 24779402
as you can see the path is to


while in


you are using


so change it accordingly

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Citrix 6.5 / Receiver 12.x / MAC OS 10.x 9 61
MacBook wifi issues 6 37
Select Query - Group By Function Producing Unexpected Results 8 19
MySQL Memory Keeps Increasing 4 33
A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
Introduction This article is intended for those who are new to PHP error handling (  It addresses one of the most common problems that plague beginning PHP develop…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now