zoukankan      html  css  js  c++  java
  • postgresql后期给开发建表的权限问题

    1、切换到指定数据库

    c axyh_360p_hunan_mobile_security_manage
    View Code

    2、回收权限

    1 revoke connect on database axyh_360p_hunan_mobile_security_manage from public;
    回收权限

    3、设置授权后的权限

    grant对以及在数据库的表进行授权

    alter default 对新建的表进行授权延续

    1 alter default privileges for user bd_zhangranran in schema public grant insert,select,update,delete,references,trigger on tables to bd_weidubin;
    2 运维人员可能会进行重新导表,所以postgres用户也要进行授权延续操作
    3 alter default privileges for user postgres in schema public grant insert,select,update,delete,references,trigger on tables to bd_weidubin;
    授权延续

    后期zhangjun用户在publi模式下建的表具有insert,select,update,delete,references,trigger权限。grant是对当时及以前的。alter default是对之后的

    4、授予连接权限

    1 grant connect on database axyh_360p_hunan_mobile_security_manage to bd_miaoyongchao;
    授予连接权限

    连接文档:
    https://blog.csdn.net/wanghai__/article/details/6337570
    权限文档:
    http://www.freeoa.net/osuport/db/the-postgres-privileges_3112.html

  • 相关阅读:
    C++ map的基本操作和用法
    堆排序汇总
    gdb调试多进程和多线程命令
    Linux内存分配机制
    svn 修改文件的可执行权限
    proc/sys/net/ipv4/下各项的意义
    linux read()和write
    ps命令参数
    /etc/passwd- 和/etc/shadow-文件
    openssh源码分析笔记
  • 原文地址:https://www.cnblogs.com/charon2/p/11314751.html
Copyright © 2011-2022 走看看