简体   繁体   中英

How to install MySQL 5.6 on OSX Mojave?

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

在此处输入图片说明

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.

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM