Follow these steps to import a .sql file into a PostgreSQL database:
-
Log in to your cPanel account.
-
Open the phpPgAdmin tool.
-
Click on the PostgreSQL link in the left tree menu and log in to the PostgreSQL server using your cPanel credentials.
-
Identify and select the database where you want to import data, then click on the SQL button.
-
Choose one of the two options:
(a) Paste the SQL queries into the provided field, or
-
(b) Upload a local file to be executed. Click the Browse button to locate the .sql file on your local computer for executing a local PostgreSQL SQL script.
-
Click the Run button. The queries from your file will be uploaded and executed on your PostgreSQL database.
That's it! Your .sql file has been successfully imported into the PostgreSQL database.