9

I need to install MySQL 5.6 on my Mac, running under Mojave. (Because AWS Aurora Serverless only allows MySQL 5.6)

That wouldn't be an issue if a .dmg was available, but there are none for MacOS for this particular version, too old I guess?

See https://dev.mysql.com/downloads/mysql/5.6.html

enter image description here

No Mac OS in the list. I tried to play around with the URL to see if there was a non-reference dmg file, but no luck.

Which leads me to two choices:

  • Install it from source (is it possible? how?)
  • Install it in a Docker container

I don't know what's the most simple/straightforward way to install it. It's only meant to be used locally.

Vadorequest
  • 16,593
  • 24
  • 118
  • 215
  • 3
    I'd recommend using homebrew to be honest. I think it's `brew install mysql@5.6` if you have homebrew installed already. – scrowler Feb 28 '19 at 22:52
  • 1
    This did work indeed! Thanks. I also ran `brew services start mysql@5.6` but I don't have any `mysql` binary available, I keep getting `command not found`, tried `mysql`, `mysql@5.6`, `mysql5.6`, `mysql5`, no luck. Any idea? – Vadorequest Feb 28 '19 at 22:57
  • 2
    The install command says you need to add it to your system path- scroll up :-) – scrowler Feb 28 '19 at 23:50
  • @RobbieAverill Your solution is the easiest, with brew. If you want to add it as a proper answer I'll accept it! – Vadorequest Mar 11 '19 at 21:16

3 Answers3

16

To install:

brew install mysql@5.6

To have launchd start mysql@5.6 now and restart at login:

brew services start mysql@5.6

Or, if you don't want/need a background service you can just run:

/usr/local/opt/mysql@5.6/bin/mysql.server start
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
11

I'd recommend using homebrew to be honest. I think it's brew install mysql@5.6 if you have homebrew installed already.

You may need to also add the install bin directory to your system path, but the command output will tell you what to do if so.

scrowler
  • 24,273
  • 9
  • 60
  • 92
0

To install MySQL version 5.6

brew install mysql@5.6

MySql will be installed in below path :

/usr/local/opt/

Add MYSQL_HOME to your environment variable

MYSQL_HOME=/usr/local/opt/mysql@5.6

goto folder

/usr/local/opt/mysql@5.6/bin

mysql.server start
Amir Saadallah
  • 668
  • 1
  • 8
  • 19
Ayush Rawat
  • 65
  • 2
  • 9
  • There's no need to duplicate existing answers, unless you want to add something new – Nico Haase Sep 14 '21 at 07:08
  • 1
    This is really not a duplicate answer. I think you're here just to put your comments. If you see carefully you will not find this in above answers. I just took help from this question. Thought to share my findings. – Ayush Rawat Sep 14 '21 at 07:11
  • Then please explain how this answer differs from the one provided by Carlos two years ago. If you think yours is different, please highlight the details – Nico Haase Sep 14 '21 at 07:13