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.

Answers:

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

Assume you have started MAMP .

Example output:

How

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:

Answers:

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

Run
Answers:

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

Mysql

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.

Mac

Also util:

Run Mysql On Mac Terminal

To find where the DBs are stored.

For more:
http://dev.mysql.com/doc/refman/5.0/en/show-variables.html

and
http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_basedir

Answers:

If you downloaded mySQL using a DMG (easiest way to download found here http://dev.mysql.com/downloads/mysql/) 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.

Source: http://geeksww.com/tutorials/database_management_systems/mysql/installation/how_to_download_and_install_mysql_on_mac_os_x.php

How To Run Mysql On Mac Terminal

Tags: mysql, sql