my sql for mac 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
Example 2: mac install mysql
brew install mysql
sudo chown -R _mysql:mysql /usr/local/var/mysql
sudo mysql.server start
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
exit
mysql -u root -p