关于mysql:通过-Homebrew-安装-MySQL-和配置

3次阅读

共计 461 个字符,预计需要花费 2 分钟才能阅读完成。

装置

  1. 装置 MySQL:brew install mysql
  2. 启动 MySQL: mysql.server start
  3. 查看 MySQL 服务状态:systemctl status mysql.service
  4. 平安设置:myqsl_secure_installation, 执行后提醒安全策略:

    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 明码

创立用户

  1. 创立用户:create user 'herbert_u'@'%' identified by 'herbert_123';
  2. 受权用户:

    grant all privileges on retail_db.* to 'herbert_u'@'%';
    flush privileges;
正文完
 0