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

装置

  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;

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理