Skip to main content

Creating and Managing PostgreSQL Databases

databases, postgresql, setup 0 Was this answer helpful?

Some applications require PostgreSQL rather than MySQL. If your hosting plan includes PostgreSQL support, you can create and manage PostgreSQL databases through cPanel.

Please note: Screens and options may vary slightly depending on your cPanel version and hosting plan.

Creating a PostgreSQL Database

  1. Log in to your cPanel account.
  2. In the Databases section, click PostgreSQL Databases.
  3. Under Create New Database, enter a name for the database.
  4. Click Create Database.

Creating a PostgreSQL User

  1. On the same page, scroll to Add New User.
  2. Enter a Username and Password.
  3. Click Create User.

Assigning a User to a Database

  1. Scroll to Add User To Database.
  2. Select the user and database from the dropdowns.
  3. Click Submit.

Managing PostgreSQL with phpPgAdmin

If phpPgAdmin is available on your server:

  1. In the Databases section, click phpPgAdmin.
  2. Expand the server list and click on your database.
  3. You can browse tables, run SQL queries, import/export data, and manage schemas.

Connection Details

| Setting | Value | |---------|-------| | Host | localhost | | Port | 5432 (default PostgreSQL port) | | Database | Your database name (with cPanel prefix) | | Username | Your database username (with cPanel prefix) | | Password | Your database user's password |

Tips

  • PostgreSQL availability depends on your hosting plan and server configuration. If you don't see the PostgreSQL option in cPanel, contact your hosting provider.
  • PostgreSQL is commonly used with Python frameworks (Django, Flask), Ruby on Rails, and some enterprise applications.
  • Backing up PostgreSQL databases follows the same principle as MySQL — use the cPanel Backup tool or the pg_dump command via SSH.

What Next?

Related Articles

knowledgebasedidyoufindanswer