brew install mysql
mysql.server start
systemctl status mysql.service
安全設置: myqsl_secure_installation
, 執行後提示安全策略:mysql
There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
根據提示選擇密碼等級, 設置 Root 密碼sql
create user 'herbert_u'@'%' identified by 'herbert_123';
受權用戶:shell
grant all privileges on retail_db.* to 'herbert_u'@'%'; flush privileges;