Installing MySQL In MAC OSX

With brew

brew install mysql

The above command installs the latest version of mysql, but if you need to install a specific version of mysql, you would use the following:

brew install mysql@5.7

After successful installation, you will see the following:

We've installed your MySQL database without a root password. To secure it run:

MySQL is configured to only allow connections from localhost by default

To connect run:
    mysql -uroot

To have launchd start mysql now and restart at login:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  mysql.server start

Leave a Reply

Your email address will not be published. Required fields are marked *