grant

Oracle将完整的dmp文件导入数据库

故事扮演 提交于 2019-11-28 10:06:17
1.创建用户表空间 create tablespace tbs_bidm (表空间的名字) datafile 'D:\app\oracle\bidm\tbs_bidm_01.dbf' size 800M (初始大小) autoextend on(自动扩展) next 512m maxsize unlimited; 2.创建一个自己的用户 create user bidm (用户名) identified by bidm(密码) default tablespace tbs_bidm(上面创建的表空间) temporary tablespace temp(临时的表空间) profile DEFAULT 3.需要给自己的用户赋予权限管理自己表空间 grant create any view to bidm; grant create session to bidm; grant debug connect session to bidm; grant select any table to ntmeta; grant dba to BIDM;-----dba为最高级权限,可以创建数据库,表等 4 打开cmd,执行下面语句: imp usename/password@localhost/orcl(表示SID) file= E:\Oracle_11g\app\Administrator

【MySQL】用户管理及备份

无人久伴 提交于 2019-11-28 07:46:36
原文: http://blog.gqylpy.com/gqy/243 我们知道我们的最高权限管理者是root用户,它拥有着最高的权限,包括select、update、delete、grant等操作。一般在公司里DBA工程师会创建一个用户和密码,让你去连接数据库的操作,并给当前的用户设置某个操作的权限(或者所有权限)。 ___ 1. 对新用户增删改 # 创建用户 create user 'zyk'@'192.168.1.2' identified by '123'; # 指定ip为192.168.1.2的zyk用户登陆 create user 'zyk'@'192.168.%.%' identified by '123'; # 指定ip为192.168.开头的zyk用户登陆 create user 'zyk'@'%' identified by '123'; # 指定任何ip的zyk用户登陆 # 删除用户 drop user '用户名'@'可访问途径'; # 修改用户 rename user '用户名'@'可访问路径' to '新用户名'@'可访问路径'; # 修改密码 set password for '用户名'@'可访问路径'=Password('新密码'); # 取消全局密码复杂度策略 set global validate_password_policy=0; 2.

SQL Server : can you limit access to only one table

ⅰ亾dé卋堺 提交于 2019-11-28 07:33:10
I think the answer is no but I'm looking to give someone access to a SQL Server database but I only really want them to have access to one table. It's easy enough to limit someone to only access one database but have no idea if I can limit to a single table. My thoughts were to create another database with a synonym to the other table and then limit the access to that database but I wondered if someone could think of a better way. I'm also not convinced that it will work as I think there will be a conflict of permissions. Mitch Wheat Yes. exec sp_msforeachtable "DENY SELECT ON ? TO [username];

GRANT with database name wildcard in MySQL?

不想你离开。 提交于 2019-11-28 04:53:14
I want to create a user 'projectA' that has the same permissions to every database named 'projectA_%' I know its possible but MySQL doesn't like my syntax: grant all on 'projectA\_%'.* to 'projectA'@'%'; Reference: http://dev.mysql.com/doc/refman/5.1/en/grant.html If I use back-tics instead of single quotes in the syntax, it appears to work just fine: grant all on `projectA\_%`.* to `projectA`@`%`; johnson GRANT ALL PRIVILEGES ON `projectA\_%`.* TO 'projectA'@'%' IDENTIFIED BY 'your_passwd'; back-tics are needed for the database name Edited:Underscore is now escaped. As per MySQL's GRANT

Minimum GRANTs needed by mysqldump for dumping a full schema? (TRIGGERs are missing!!)

荒凉一梦 提交于 2019-11-28 03:32:01
I have a MySQL user called dump with the following perms: GRANT USAGE ON *.* TO 'dump'@'%' IDENTIFIED BY ... GRANT SELECT, LOCK TABLES ON `mysql`.* TO 'dump'@'%' GRANT SELECT, LOCK TABLES ON `myschema`.* TO 'dump'@'%' I want to dump all data (included triggers and procedures) using the dump user. I call mysqldump in the following way: mysqldump -u dump -p --routines --triggers --quote-names --opt \ --add-drop-database --databases myschema > myschema.sql Everything is OK with the dumped file except for the triggers, they are missing !! The triggers are dumped correctly if I try mysqldump with

Execute Immediate fails even with CREATE table grant

给你一囗甜甜゛ 提交于 2019-11-28 02:04:01
I have a problem where I am creating a table using the execute immediate command in the stored procedure. However I get the error of "insufficient privileges". I checked other threads and made sure that the user has "CREATE TABLE" privilege granted to it. However I still keep seeing the same error. SQL> select * from USER_SYS_PRIVS; USERNAME PRIVILEGE ADM ------------------------------ ---------------------------------------- --- MYUSER CREATE VIEW NO MYUSER UNLIMITED TABLESPACE NO SQL> select * from session_privs; PRIVILEGE ---------------------------------------- CREATE SESSION UNLIMITED

PostgreSQL 8.4 grant DML privileges on all tables to a role

佐手、 提交于 2019-11-28 00:58:23
How do I go about granting DML (SELECT,INSERT,UPDATE,DELETE) on all tables in a schema in PostgreSQL 8.4? I'd also like this grant to persist for new table creation in the future as well. I've seen solutions for 9.0 but I'm stuck with 8.4 as it ships with Debian stable. I have tried the following as a baseline but it doesn't work, resulting in the inevitable "access to relation X denied": GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser; I've dredged through the documentation and I can't seem to find a suitable solution. I'd also like this grant to persist for new table creation in the

MySQL创建用户、为用户授权

倾然丶 夕夏残阳落幕 提交于 2019-11-28 00:09:39
小马哥博客:https://www.cnblogs.com/majj/p/9179218.html 一、创建用户 1.root用户(管理员)登录,进入mysql数据库 mysql> use mysql Database changed 2.创建用户 1.创建用户: # 指定ip:192.168.43.144的Sroxi用户登录 create user 'Srox'@'192.168.43.144' identified by '123'; # 指定ip:192.162.43.开头的Sroxi用户登录 create user 'Sroxi'@'192.118.1.%' identified by '123'; # 指定任何ip的Sroxi用户登录 create user 'Sroxi'@'%' identified by '123'; 2.删除用户 drop user '用户名'@'IP地址'; 3.修改用户 rename user '用户名'@'IP地址' to '新用户名'@'IP地址'; 4.修改密码 set password for '用户名'@'IP地址'=Password('新密码'); 3.为用户授权 #查看权限 show grants for '用户'@'IP地址' #授权 Sroxi用户仅对db1.t1文件有查询、插入和更新的操作 grant select

【MySQL】用户管理及备份

流过昼夜 提交于 2019-11-27 21:27:55
原文: http://blog.gqylpy.com/gqy/243 "我们知道我们的最高权限管理者是root用户,它拥有着最高的权限,包括select、update、delete、grant等操作。一般在公司里DBA工程师会创建一个用户和密码,让你去连接数据库的操作,并给当前的用户设置某个操作的权限(或者所有权限)。 ___ 1. 对新用户增删改 # 创建用户 create user 'zyk'@'192.168.1.2' identified by '123'; # 指定ip为192.168.1.2的zyk用户登陆 create user 'zyk'@'192.168.%.%' identified by '123'; # 指定ip为192.168.开头的zyk用户登陆 create user 'zyk'@'%' identified by '123'; # 指定任何ip的zyk用户登陆 # 删除用户 drop user '用户名'@'可访问途径'; # 修改用户 rename user '用户名'@'可访问路径' to '新用户名'@'可访问路径'; # 修改密码 set password for '用户名'@'可访问路径'=Password('新密码'); # 取消全局密码复杂度策略 set global validate_password_policy=0; 2.

Mysql开启远程连接

血红的双手。 提交于 2019-11-27 21:18:23
Mysql远程无法连接 客户端远程连接mysql失败.(mysql server在Ubuntu上) ip能ping通,telnet ip:3306端口不通 Ubuntu下防火墙已经关闭 sudo ufw disable Ubuntu ping windwos不通,关闭Windows防火墙后能ping通了 还是连接不上 忘记了 MySQL默认禁止远程访问了 接下来: #登陆mysql $ mysql -uroot -p mysql> use mysql; mysql> update user set host = '%' where user = 'root'; mysql> select host, user from user; +-----------+------------------+ | host | user | +-----------+------------------+ | % | root | | localhost | debian-sys-maint | | localhost | mysql.session | | localhost | mysql.sys | +-----------+------------------+ 4 rows in set (0.00 sec) #ok 退出MySQL 重启服务 mysql> quit; $