Set a new password for a database user when the old one is lost or needs changing. You can reset the password of the admin user you set when you created the database, and of any user created with SQL.
Before you begin
Section titled “Before you begin”- A database in the Running state.
- Permission to update databases in the project. See TIR Access Control.
See the database’s users
Section titled “See the database’s users”Open the database’s page and select the Connect tab. Once the database is Running, you can choose any login on the database under Connect as, including users you created with SQL. The platform’s own logins are not there.
Reset the password
Section titled “Reset the password”- On the Connect tab, choose the user under Connect as.
- Select Reset Password beside it.
- In New Password, enter a password of 12 to 64 characters with at least one uppercase letter, one lowercase letter, one number, and one symbol. For a random 20-character password that meets the rule, select Suggest.
- Copy the new password and keep it somewhere safe. The connection strings show
<password>in its place. - Select Reset Password.
The reset is recorded on the database’s Activity Timeline with the user’s name. If it fails, TIR gives the reason.
You can also start a reset from the Connect button at the top of the database’s page. Choose the user, then select Reset password.
The new password takes the place of the old one. Update it in every app, environment file, and tool that connects as this user. To check it, connect with the command from Copy psql; see Connect to a database.
Add another user
Section titled “Add another user”TIR lists users and resets their passwords. You create, rename, and delete users with SQL. To give an app or a person its own login, create the user with SQL while you are connected to the database, for example:
CREATE ROLE <username> WITH LOGIN PASSWORD '<password>';Replace <username> with the new login’s name and <password> with its password. The new user then
appears under Connect as, and you can reset its password the same way as any other.