mysql command line macos code example
Example 1: install mysql on mac
Using Homebrew:
brew install mysql
brew tap homebrew/services
brew services start mysql
mysqladmin -u root password 'secretpaSSw0rd'
Using Docker:
docker pull mysql/mysql-server
docker run --name=mysql -d mysql/mysql-server
Example 2: how to run mysql on terminal mac
sudo sh -c 'echo /usr/local/mysql/bin > /etc/paths.d/mysql'