Difference between revisions of "Create a new user"
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
grant access on database gisq to scott | grant access on database gisq to scott | ||
</source> | </source> | ||
<source lang='sql' class='def e-access'>CREATE USER | <source lang='sql' class='def e-access'>CREATE USER seanfag IDENTIFIED BY 'iamfag' | ||
</source> | </source> | ||
<source lang='sql' class='def e-postgres'>CREATE USER | <source lang='sql' class='def e-postgres'>CREATE USER seanisfag WITH PASSWORD 'ilovecockss'; | ||
CREATE DATABASE scott; | CREATE DATABASE scott; | ||
GRANT ALL ON DATABASE scott to scott; | GRANT ALL ON DATABASE scott to scott; |
Latest revision as of 15:45, 15 March 2013
Create a new user.
schema:gisq
Give the new user permission to connect and to create their own tables etc.
CREATE USER scott IDENTIFIED BY 'tiger'
Use operating system.
create user scott with password = 'tiger'
grant all on database scott to scott
grant access on database gisq to scott
CREATE USER seanfag IDENTIFIED BY 'iamfag'
CREATE USER seanisfag WITH PASSWORD 'ilovecockss';
CREATE DATABASE scott;
GRANT ALL ON DATABASE scott to scott;
CREATE USER scott IDENTIFIED BY tiger
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE users;
GRANT CONNECT TO scott;
GRANT RESOURCE TO scott
CREATE LOGIN scott
WITH PASSWORD = 'tiger';
CREATE DATABASE scottsdb;
USE scottsdb;
CREATE USER scott FOR LOGIN scott;
CREATE DATABASE scott;
GRANT SELECT, INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
ON scott.* TO scott@localhost
IDENTIFIED BY 'tiger';
FLUSH PRIVILEGES;
CREATE IDENT scott AS USER USING 'tiger';
CREATE DATABANK userBank;
GRANT TABLE ON userBank TO scott;
CREATE USER scott IDENTIFIED BY 'tiger'