How do I find out where MySQL is installed on Mac OS X 10.7.9? I have MAMP installed so I presume that it is bundled with this install?

This article is based on macOS High Sierra version: 10.13.4 and hopefully can work for all MacBooks having OSX+ version. Now, this is one way to start and stop the mysql server manually. In this post we will learn how to How To Install MySQL on Mac OS X. The same procedure can be used for installing MySQL on Mac OS X.How to add MySQL to $PAT.


To check MySQL version of MAMP , use the following command in Terminal:

Assume you have started MAMP .

Example output:


UPDATE: Moreover, if you want to find where does mysql installed in system, use the following command:

type -a is an equivalent of tclsh built-in command where in OS X bash shell. If MySQL is found, it will show :

If not found, it will show:

By default , MySQL is not installed in Mac OS X.

Sidenote: For XAMPP, the command should be:


It will be found in /usr/local/mysql if you use the mysql binaries or dmg to install it on your system instead of using MAMP


If you run SHOW VARIABLES from a mysql console you can look for basedir.


When I run the following:

on my system I get /usr/local/mysql as the Value returned.
(I am not using MAMP – I installed MySQL with homebrew.

mysqldon my machine is in /usr/local/mysql/bin so the basedir is where most everything will be installed to.


Also util:

Run Mysql On Mac Terminal

To find where the DBs are stored.

For more:



If you downloaded mySQL using a DMG (easiest way to download found here in Terminal try: cd /usr/local/

When you type ls you should see mysql-YOUR-VERSION. You will also see mysql which is the installation directory.


How To Run Mysql On Mac Terminal

Tags: mysql, sql