In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Create a user
Postgres=# create user test password 'test'
CREATE ROLE
Note: there is no distinction between user and role in PostgreSQL. "CREATE USER" is an alias for "CREATE ROLE". The two commands are almost identical, except that the user created by the "CREATE USER" command has the LOGIN attribute by default, while the user created by the "CREATE ROLE" command does not have the LOGIN attribute by default.
two。 Create a tablespace
Postgres=# create tablespace tbs owner test location'd:\ postgresql\ data\ tbs'
CREATE TABLESPACE
3. Create a database
Postgres=# create database mydb with owner = test encoding = 'UTF8' tablespace =' tbs'
CREATE DATABASE
4. Authorize the user
Postgres=# grant all on database mydb to test with grant option
GRANT
Postgres=# grant all on tablespace tbs to test
GRANT
5. Connect to the database with the newly created user
D:\ PostgreSQL\ bin > psql-U test mydb
Psql (12.0)
Enter "help" for help.
Mydb= >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.