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;