在Debian上管理PostgreSQL用户,您需要使用psql
命令行工具或者执行SQL命令
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
postgres
用户:sudo -i -u postgres
psql
命令行工具连接到PostgreSQL数据库:psql
your_username
和your_password
为您想要的用户名和密码):CREATE USER your_username WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE your_database_name TO your_username;
ALTER USER your_username WITH SUPERUSER;
your_username
替换为您要删除的用户名):DROP USER your_username;
your_username
替换为您要更改密码的用户名):ALTER USER your_username WITH PASSWORD 'new_password';
\du
psql
命令行工具:\q
现在您已经知道如何在Debian上管理PostgreSQL用户了。请确保根据您的需求调整权限和角色。