Create PostgreSQL Databases in cPanel

MySQL, PostgreSQL and MariaDB are the top three open-source relational databases available today. Currently MySQL has a much bigger user base than PostgreSQL. PostgreSQL is becoming more and more popular as an alternative choice of database in the enterprise. According to DB-Engines Ranking, PostgreSQL has significantly increased its market share over the recent years. All the other top databases have either decreased or had minor increases. Most web hosting services support this powerful, open source object-relational database system now. Today, we will show you how to create PostgreSQL database in cPanel.

More About PostgreSQL Databases

PostgreSQL Databases allow you to store a large amount of information in an easy to access manner. PostgreSQL databases are required by many web applications, like BBS, CMS and others. The databases themselves are not easily read by humans. Managing databases from the command line does come with a learning curve to get the most out of it. Fortunately we can find various open source front-ends GUI tools for administering PostgreSQL. These tools are easier to use than the command line. In most cases, you don’t need any programming or sysadmin knowledge to use them. pgAdmin is one of the most popular ones.

PostgreSQL Database

Create PostgreSQL Databases

To create a PostgreSQL Database, log in to your cPanel account. We will use Inmotion hosting in this demo. Under Databases section, click the PostgresSQL Databases icon to open the PostgreSQL Databases page. On this page, you can create and manage PostgreSQL databases, users and passwords.

cpanel databases inmotion

In the Database Name field, type a name for the database. Click Create Database button. You are finished when you see a message stating “Added the database” along with the database name. Click the Go Back button to manage databases.

create new postgresql database in cpanel with inmotion
create new postgresql database in cpanel with inmotion

Create PostgreSQL database user

To use a database, you’ll need to create the database first, then create a user and grant it the permission to access the database. Only PostgreSQL users with the privileges to access a database can read from or write to that database.

Also on the same PostgreSQL Databases page, jump to the PostgreSQL Users section, enter the username and the same password twice, then hit Create User button to create a new database user.

create new postgresql user in cpanel

You will be told that the new PostgreSQL user was successfully created. Click Go Back button to return to previous page.

Adding user to database

As we mentioned above, you will also need to grant the user the privileges to access the database, otherwise it won’t be able to read from or write to that database.

Scroll down to the Add User to Database section, select the user and database in the corresponding fields, then hit Submit button.

add user to postgresql database in capon

Leave a Reply