-- With login --
CREATEUSERmy_pg_userWITHPASSWORD'your_secure_password';-- No login --
CREATEROLEmy_pg_userWITHLOGINPASSWORD'strong_password';
Update
1
2
3
4
5
-- Update password for a specific user
ALTERUSER'my_pg_user'@'localhost'IDENTIFIEDBY'new_secure_password';-- If you are updating your OWN password
SETPASSWORD=PASSWORD('new_secure_password');