How to create a user in PostgreSQL
来源:互联网 发布:算法塞奇威克 编辑:程序博客网 时间:2024/05/16 06:48
I had try to use the Windows Version of PostgreSQL. But I found that version of postgresql was not as friendly to users as the Windows Version of MySQL. In my point, maybe the reason why is that PostgreSQL use something that does work under Linux, but not under Windows. For example, when i use an account which is same as the account i login windows for starting/stoping the PostgreSQL service in the installition, there world be a permission error. And the installision then failed. All would rollbacked. I had to use the default configure to install PostgreSQL in Windows to avoid some unnessesary problem. Anyway, I just wanna learn and use PostgreSQL. It's fine if it can work.
hehe, let's see how to create a user in PostgreSQL. It's easy.
we login the psql, and use this command:
create user andrewleung with createdb password '123456';
now, we have create a user which name 'andrewleung' with the password 123456 and the permission of create database. if we wanna cancel the permission of create database, we can use this command:
alter user andrewleung no createdb;
hehe, let's see how to create a user in PostgreSQL. It's easy.
we login the psql, and use this command:
create user andrewleung with createdb password '123456';
now, we have create a user which name 'andrewleung' with the password 123456 and the permission of create database. if we wanna cancel the permission of create database, we can use this command:
alter user andrewleung no createdb;
The complete syntax for the CREATE USER command is
CREATE USER user-name
[[WITH] option ]...
option := SYSID user-id-number
| [NO]CREATEDB
| [NO]CREATEUSER
| IN GROUP groupname [, ...]
| [[UN]ENCRYPTED ] PASSWORD 'password'
| VALID UNTIL 'expiration'
- How to create a user in PostgreSQL
- How to create a remote desktop user
- How to create a read-only user in TFS source control
- How to: Create a Binding in Code
- How to create a function in SQL
- How to create a link in Linux
- How to create user defined properties in Maven
- User Xcode and GCC How to create a C programe
- How to create a read-only user in TFS source control
- How to create a read-only user in TFS source control
- How to create a read-only user in TFS source control
- How-To create a MySQL database and set privileges to a user
- How to: Create a C# Test Project Add-In -wisdom
- How to Create a Slick and Clean Button in Photoshop
- how to create a global singleton object in exe
- How to create SVAs in a seperate file
- How to create a simple Ad Hoc Reporting in HR ?
- How to create a Toastmasters speech in 30 minutes
- 操作系统随课实验题目一
- 与您相约2008北京图书订货会
- ASF转MP3
- 新年新计划~~
- 浅析大型门户网站的架构 [转]
- How to create a user in PostgreSQL
- 国内大型门户网站架构分析-大型门户网站的cdn部署(服务器负载均衡)
- Java技术回顾之JNDI:JNDI API
- UNICODE和ASCII
- Pebrowse Professional Interactive V 8.6.2
- [转贴]看电影总结出来的靠不住之终结版
- MMPP--物料替换
- 网人网语
- 咽喉肿痛