title: PostgreSQL Databases
created at: Sat Oct 19 2024 15:46:10 GMT+0000 (Coordinated Universal Time)
updated at: Wed Jul 23 2025 20:14:52 GMT+0000 (Coordinated Universal Time)
---
# PostgreSQL Databases
# Overview
Use this interface to create, manage, and delete PostgreSQL databases and database users.
To add or delete information in existing databases, copy a database, or run PostgreSQL queries and scripts, use cPanel’s [*phpPgAdmin*](https://docs.cpanel.net/cpanel/databases/phppgadmin/) interface (*cPanel » Home » Databases » phpPgAdmin*).
> \[!WARNING]
> Important
> Do **not** use *phpPgAdmin* to create databases or database users.
> \[!NOTE]
> Note
> This interface **only** appears in your cPanel account if your hosting provider installs and configures PostgreSQL in WHM’s [*Configure PostgreSQL*](https://docs.cpanel.net/whm/database-services/configure-postgresql/) interface (*WHM » Home » Database Services » Configure PostgreSQL*).
> To create your **first** database and user, we recommend that you use the [*PostgreSQL Database Wizard*](https://docs.cpanel.net/cpanel/databases/postgresql-database-wizard) interface (*cPanel » Home » Databases » PostgreSQL Database Wizard*).
> The maximum length of a database name is 63 characters. If you enable database prefixing, this length includes the database prefix and underscore character (`_`).
> To enter information in a database, use the *phpPgAdmin* interface (*cPanel » Home » Databases » phpPgAdmin*).
# Create a database
To create the database, perform the following steps:
1. In the *Database Name* text box, enter a name for the database.
2. Click *Create Database*.
3. Click *Go Back*. The new database will appear in the *Current Databases* table.
# Current Databases
The Current Databases table lists the following information for each database in your account:
* *Database* — The name of the database.
* *Size* — The size of the database.
* *Privileged Users* — Users who can manipulate the database.
* *Actions* — Click the appropriate icon in this column to perform an action on the corresponding user or database.
## Remove a user
To remove a user from a database, perform the following steps:
1. In the *Current Databases* table, click *Delete* next to the user that you want to delete.
2. To remove the user’s privileges to manage the database, click *Yes*.
## Rename a database
> \[!WARNING]
> Warning
> When you rename a database, the system terminates all active connections to the database.
> You **must** manually update configuration files and applications to use the new database name.
> The system requires more time to rename larger and more complex databases.
To rename a database, perform the following steps:
1. Click *Rename* in the *Actions* column next to the database that you wish to rename.
2. Enter the new database name in the *New name* text box.
3. Click *Proceed*.
## Delete a database
To delete a database, perform the following steps:
1. Click *Delete* in the *Actions* column next to the database that you wish to delete.
2. To permanently delete the database, click *Delete Database*.
# Add a PostgreSQL user
After you create the database, add users to the database.
> \[!NOTE]
> Note
> You **must** create a user before you can add the user to an existing database.
> You **must** create PostgreSQL user accounts separately from mail and administrator accounts.
To create a new user account, perform the following steps:
1. Enter a username in the *Username* text box.
> \[!NOTE]
> The maximum length of a database username is 63 characters. If you enable database prefixing, this length includes the `database` prefix and underscore character (`_`).
1. Enter and confirm the new password in the appropriate text boxes.
> \[!WARNING]
> The password **must** contain at least five characters.
> \[!NOTE]
> Note
> The system evaluates the password that you enter on a scale of 100 points. `0` Indicates a weak password, while `100` indicates a very secure password.
> Some web hosts require a minimum password strength. A green password *Strength* meter indicates that the password is equal to or greater than the required password strength.
> Click *Password Generator* to generate a strong password. For more information, read our [Password & Security](https://docs.cpanel.net/cpanel/preferences/password-and-security) documentation.
1. Click *Create User*.
> \[!WARNING]
> Warning
> versions of PostgreSQL are ANSI SQL-92 compliant and do not support recursive grants, wildcard grants, or future grants. To ensure that users continue to have access to the information in your PostgreSQL tables, *click Synchronize Grants*.\
> We recommend that you synchronize the grants after you take the following actions:
> Add a new user.
> Add an existing user to a database.
> Create a new table manually in phpPgAdmin.
# Add a user to a database.
To add a user to a database, perform the following steps:
1. Select the appropriate user and the database you want to add the user to from the *User* and *Database* menus.
2. Click *Submit*.
# Current Users
The *Current Users* table lists all of your PostgreSQL users. Use the functions in this table to change user passwords and usernames, or to delete users.
## Change a PostgreSQL user password.
To change a PostgreSQL user’s password, perform the following steps:
1. In the *Current Users* table, click *Change Password* in the *Actions* column next to the user that you wish to change.
2. Enter and confirm the new password in the appropriate text boxes.
> \[!WARNING]
> The password **must** contain at least five characters.
> \[!NOTE]
> Note
> The system evaluates the password that you enter on a scale of 100 points. `0` Indicates a weak password, while `100` indicates a very secure password.
> Some web hosts require a minimum password strength. A green password *Strength* meter indicates that the password is equal to or greater than the required password strength.
> Click *Password Generator* to generate a strong password. For more information, read our [Password & Security](https://docs.cpanel.net/cpanel/preferences/password-and-security) documentation.
1. Click *Change Password*.
## Change a PostgreSQL user name.
To change a PostgreSQL user’s username, perform the following steps:
1. Click *Rename* in the *Actions* column for the user that you wish to rename.
2. Enter the new username for the account in the *New name* text box.
3. Click *Proceed*.
> \[!WARNING]
> Warning
> When you rename a PostgreSQL user, the *Change Password* interface automatically appears so you can reset the password for the database user. The MD5 hash that PostgreSQL creates to store user passwords requires this step.
## Delete a PostgreSQL user
To delete a PostgreSQL user account, perform the following steps:
1. Click *Delete* in the row next to the user that you wish to delete.
2. To permanently delete the account, click *Remove User*.