grant

postgresql常用命令

风格不统一 提交于 2019-12-01 02:40:50
最近一直在学习Postgresql,下面是自己整理的Postgresql的常用命令 连接数据库, 默认的用户和数据库是postgres psql -U user -d dbname 切换数据库,相当于mysql的use dbname \c dbname 列举数据库,相当于mysql的show databases \l 列举表,相当于mysql的show tables \dt 查看表结构,相当于desc tblname,show columns from tbname \d tblname SELECT column_name FROM information_schema.columns WHERE table_name = 'table_name'; \di 查看索引 创建数据库: create database [数据库名]; 删除数据库: drop database [数据库名]; *重命名一个表: alter table [表名A] rename to [表名B]; *删除一个表: drop table [表名]; *在已有的表里添加字段: alter table [表名] add column [字段名] [类型]; *删除表中的字段: alter table [表名] drop column [字段名]; *重命名一个字段: alter table [表名]

mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

不问归期 提交于 2019-11-30 22:26:59
提示意思是不能用grant创建用户,mysql8.0以前的版本可以使用grant在授权的时候隐式的创建用户,8.0以后已经不支持,所以必须先创建用户,然后再授权,命令如下: mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'Hadoop3!'; Query OK, 0 rows affected (0.04 sec) mysql> grant all privileges on *.* to 'root'@'%'; Query OK, 0 rows affected (0.03 sec) 另外,如果远程连接的时候报plugin caching_sha2_password could not be loaded这个错误,可以尝试修改密码加密插件: mysql> alter user 'root'@'%' identified with mysql_native_password by 'Hadoop3!'; 来源: https://www.cnblogs.com/B1ackWall/p/11643136.html

(真本)*麦科文大学#文凭|Grant Grant MacEwan文凭一模一样

半腔热情 提交于 2019-11-30 19:57:15
《麦科文大学毕业证》【微/Q:16320285——WeChat:16320285】《Grant Grant MacEwan毕业证书)【帖子永久有效, 被删请点击百度快照】【留信网认证&博士&硕士&海归&本科&排名&成绩单】制作国外(海外)澳洲英国、加拿大、韩国、美国、新西兰等各大学毕业证,修改成绩单分数,认证,文凭,diploma,degree 真实认。海外回囯的同学定制毕业证、真实认证、毕业证、学位证书、使馆公证、囯外真实学位认证、使馆留学回囯人员证明、录取通知书、Offer、在读证明、雅思及托福成绩单、网上存档永久可查![实体经营,值得信赖]十五年致力于帮助留学生解决无法毕业,无法认证真实的难题;并帮助留学生制作国外大学毕业证(16320285),成绩单,真实认证、成绩单以及回国所需的真实学位真实认证。 根据美国彭博社报道,美国苹果公司近日决定重新上架一款曾被其禁止上架的香港地图应用。 这款地图应用名为“HKmap.live”,是一个名为“HKmap.live全港抗争即时地图”的网站的手机版。该网站因能即时显示香港警察所在的街头区域而被“乱港暴徒”广泛使用,用以“躲避”警察的逮捕。 根据美国彭博社的报道,“HKmap.live”曾于10月2日被苹果公司拒绝在其应用商店上架,理由是这款地图app会“鼓动非法行为”。 在苹果公司发给这个应用研发者的一封邮件中

docker安装mysql并能在外网访问

主宰稳场 提交于 2019-11-30 16:36:21
docker安装mysql并能在外网访问 问题描述:docker 安装mysql,但是其他主机一直连接不上 环境准备:1.安装docker2.docker安装mysql docker -images 查看dock镜像文件 1.启动docker,创建mysql容器: docker run --name mysqlserver –network=host -e MYSQL_ROOT_PASSWORD=123456 -d -i -p 3306:3306 mysql:5.6 name —>mysql的名称 –network=host ---->将本机ip映射到外网 mysql:5.6 是mysql镜像文件 2.进入mysql容器 docker exec -it 3eec307177ae /bin/bash 3eec307177ae (运行的容器id)可通过docker ps 查看 mysql -uroot -p 输入密码登录mysql,默认密码123456(前面设置的) 3.授权到外网访问 GRANT ALL PRIVILEGES ON . TO ‘jie’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION; 注解: GRANT ALL PRIVILEGES ON . (表示所有的操作表的所有权限,可以自行控制) TO ‘jie(用户名)’@’%

Liunx环境安装Mysql,liunx环境mysql

若如初见. 提交于 2019-11-30 16:01:29
Liunx环境安装Mysql,liunx环境mysql 1.1 查看mysql的安装路径: [root@bogon ~]# whereis mysql mysql: /usr/bin/mysql /usr/lib/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz 1.2 查看mysql的安装包: [root@bogon ~]# rpm -qa|grep mysql mysql-community-client-5.6.26-2.el6.i686 mysql-community-release-el6-5.noarch mysql-community-common-5.6.26-2.el6.i686 mysql-community-libs-5.6.26-2.el6.i686 mysql-community-server-5.6.26-2.el6.i686 1.3 卸载mysql [root@bogon ~]# yum remove mysql 删除mysql的数据库文件: 删除/var/llib/mysql目录 1.4 安装mysql 第一步:从oracle官方网站下载linux系统对应的mysql的yum源包。 第二步:把yum源包上传到linux,安装。 [root@bogon ~]# yum localinstall

postgresql 9.1 - access tables through functions

杀马特。学长 韩版系。学妹 提交于 2019-11-30 14:08:07
I have 3 roles: superuser, poweruser and user. I have table "data" and functions data_select and data_insert. Now I would like to define, that only superuser can access table "data". Poweruser and user can not access table "data" directly, but only through the functions. User can run only function data_select, poweruser can run both data_select and data_insert. So then I can create users alice, bob, ... and inherits them privileges of user or poweuser. Is this actually achievable? I am fighting with this for the second day and not getting anywhere. Thank you for your time. Erwin Brandstetter

“IDENTIFIED BY 'password'” in MySQL

断了今生、忘了曾经 提交于 2019-11-30 11:04:41
I often see in many MySQL tutorials that people use command IDENTIFIED BY 'password' both during user creation and granting him privileges. For example: CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON database.* TO 'username'@'localhost' IDENTIFIED BY 'password'; I tried using GRANT without IDENTIFIED BY and it works. Can somebody explain me why it is used twice? Could there be other password for specific privileges? GRANT is meant for adding privileges to users. Confusingly, it also has the ability to create users and change their passwords. This

postgresql入门 --转载

谁说胖子不能爱 提交于 2019-11-30 10:13:44
Postgresql的常用命令 连接数据库, 默认的用户和数据库是postgres psql -U user -d dbname 切换数据库,相当于mysql的use dbname \c dbname 列举数据库,相当于mysql的show databases \l 列举表,相当于mysql的show tables \dt 查看表结构,相当于desc tblname,show columns from tbname \d tblname \di 查看索引 创建数据库: create database [数据库名]; 删除数据库: drop database [数据库名]; *重命名一个表: alter table [表名A] rename to [表名B]; *删除一个表: drop table [表名]; *在已有的表里添加字段: alter table [表名] add column [字段名] [类型]; *删除表中的字段: alter table [表名] drop column [字段名]; *重命名一个字段: alter table [表名] rename column [字段名A] to [字段名B]; *给一个字段设置缺省值: alter table [表名] alter column [字段名] set default [新的默认值]; *去除缺省值: alter

How can I list ALL grants a user received?

爷,独闯天下 提交于 2019-11-30 10:04:37
问题 I need to see all grants on an Oracle DB. I used the TOAD feature to compare schemas but it does not shows temptable grants etc. so there's my question: How can I list all grants on a Oracle DB? 回答1: If you want more than just direct table grants (e.g., grants via roles, system privileges such as select any table, etc.), here are some additional queries: System privileges for a user: SELECT PRIVILEGE FROM sys.dba_sys_privs WHERE grantee = <theUser> UNION SELECT PRIVILEGE FROM dba_role_privs

Grant on multiple databases. MySQL

你离开我真会死。 提交于 2019-11-30 09:17:56
How to grant on multiple databases? MySQL. Something like GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON 'databasesprefix%'.* TO testuser@localhost IDENTIFIED BY 'testpasswd'; ax. your example should work. from the (5.5) manual : The “_” and “%” wildcards are allowed when specifying database names in GRANT statements that grant privileges at the global or database levels. with % matching any number (even zero) of characters, and _ matching exactly one character. if you want a _ in your database name, you have to escape it as \_ . also watch the other caveats from the manual. < UPDATE >as the