用户管理

  • 创建:

    1. create user backup identified by '123456';
  • 配置权限

    • 常用权限:分配多个权限时用’,’隔开
    • all privileges
    • select
    • delete
    • update
    • create
    • drop
      1. # 查看某个用户的权限
      2. show grants for '<username>';
      3. # 授权
      4. grant <privileges> on <database_name>.<table_name> to <username>@'<host>' identified by '<password>';
      5. # 刷新权限
      6. flush privileges;