Install Homebrew if you do not have already installed.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install brew services
Install brew services using following terminal command.
$ brew tap homebrew/services
Install MySQL 5.7
List the default MySQL available formulae in main repository.
$ brew info email@example.com
Install MySQL 5.7 using
brew install command.
$ brew install firstname.lastname@example.org
Load and start the MySQL service
Start MySQL service using
brew services start command.
$ brew services start email@example.com
Check of the MySQL service has been loaded.
$ brew services list
Force link 5.7 version
$ brew link firstname.lastname@example.org --force
Verify the installed MySQL instance
Verify the newly installed instance of MySQL server.
$ mysql -V
The output of
mysql -V will be like following one.
mysql Ver 14.14 Distrib 5.7.24, for osx10.14 (x86_64) using EditLine wrapper
Configuration of MySQL 5.7 server
Open terminal and execute the following command to set the root password.
mysqladmin -u root password 'yourpassword'
MySQL 5.7 Database Management
You can use Sequel Pro GUI client to manage MySQL
brew services start email@example.com
Above mentioned instruction is same as executing following commands individually.
$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
That’s it, hope you enjoyed it. You like this article, have any questions or suggestions please let us know in the comments section.
Thanks and Happy Learning!