Can't create Data bases in my virtual machine

Keywords: PostgreSQL - Amazon Web Services - Technical issue - Other
Description:
Hi Bitnami team,
I’m developing three tier application, I’m using bitnami distribution of Nginx, Tomcat and Postgres with Amazon EC2. I have problems with Postgres, because I can’t create a database for my application. I don’t know why. Please, I need your support.
Thank you.
Regards

Hi,

Could you please provide us a little more information?

  • Which exact version of the application are you using?
  • Have you installed any plugin or modified any configuration file?
  • Which steps did you take in order to reproduce the error?

Also, we have a Support Tool that will gather relevant information for us to debug the issue. Could you please download and execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool

Best regards,
Carlos R. Hernández

HI,
thanks, I’m using an Amazon Free tier, I’m locate Bitnami Postgress in Amazon Market Place. I need to create database for my application. If everything is Ok in testing environment, we will configure for Production environment.

Instance type
t2.micro

Availability zone
us-west-2a

Security groups
PostgreSQL powered by Bitnami-9-6-5-0 on Ubuntu 14-04-AutogenByAWSMP-2. view inbound rules

AMI ID
bitnami-postgresql-9.6.5-0-linux-ubuntu-14.04-x86_64-hvm-ebs-mp-09557605-3c36-413e-a9b3-71a0ea8f118a-ami-1f7a6764.4 (ami-dc8576a4)

Launch time
December 17, 2017 at 1:07:27 PM UTC-5 (524 hours)

Root device type
ebs

Hi,
more information.
I enter commands, don’t show me errors, but don’t do anything.
But I can see existing database.
I don’t know if this occurs because is Amazon free tier.

Thanks.

Hi,

We have a section about how to create a database for a custom application, can you take a look?

If you have any issue creating the database, can you paste here the commands that you are using? (A screenshot of the terminal is also fine).

Please let us know if this solves the issue.

Best regards,
Carlos R. Hernández

bitnami@ip-172-31-21-114:~$ psql -U postgres
Password for user postgres: 
psql.bin (9.6.5)
Type "help" for help.

postgres=# 
postgres=# 
postgres=# 
postgres=# 
postgres=# create database FIODB
postgres-# \list
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
-----------+----------+----------+-------------+-------------+-----------------------
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(3 rows)

postgres-# 

The database hasn’t created.

Hi,

You should add ; at the end of your command.
I just reproduce your case adding the ; and it works fine:

postgres=# CREATE DATABASE FIODB;
CREATE DATABASE
postgres=#
postgres=#
postgres=# \list
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 FIODB     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(4 rows)

Please let us know if this solves the issue.

Best regards,
Carlos R. Hernández

Thank you!

it works.

postgres=# \list
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
-----------+----------+----------+-------------+-------------+-----------------------
 fiodb     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(4 rows)

Hi,

We are glad that you were able to fix the issue. We are marking the previous answer as “Solution” and this topic as “Closed”.
If you have any other questions, please do not hesitate to let us know. Feel free to create a new topic referencing to this one if necessary.

Best regards,
Carlos R. Hernández