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 firstname.lastname@example.org
Install MySQL 5.7 using
brew install command.
$ brew install email@example.com
Load and start the MySQL service
Start MySQL service using
brew services start command.
$ brew services start firstname.lastname@example.org
Check of the MySQL service has been loaded.
$ brew services list
Force link 5.7 version
$ brew link email@example.com --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 firstname.lastname@example.org
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!