建库及用户

  1. 新建数据库
    CREATE DATABASE aaa;
    
  2. 新建用户
    CREATE USER bbb WITH PASSWORD 'xxxxx';
    
  3. 授权
    GRANT ALL PRIVILEGES ON DATABASE aaa TO bbb;
    

修改用户密码

  1. 修改密码
    ALTER USER bbb WITH PASSWORD '123456';
    

删库及用户

  1. 删除数据库
    DROP DATABASE aaa;
    
  2. 删除用户
    DROP USER bbb;