Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Learn How to Create Postgresql Server on Termux Terminal. ### Drop Comments 💧

Termux && Postgresql

How to create Local Database On Termux Terminal

  • Install the Postgresql Servers first to your Termux Terminal.
initdb ~/pg
  • Start the Server
pg_ctl -D ~/pg start
  • Create a username for your database anything you want it to be:
createuser -P -s -e Your_Username
  • Make sure you change Your_Usernams to what ever you want.
  • Now Let create Database Username:
createdb -O Your_Username Your_Database
  • Note: You must change your username to the username you provided before and change your database to your new database name use any name you like also.

Thanks for your time ! Feel free to contact me via Telegram: John on Telegram

@efranelas
Copy link

efranelas commented Mar 6, 2021

Thank you! After that I used this command to connect:

psql -U myDatabaseUsername -d myDatabaseName

@ItsAleph
Copy link

ItsAleph commented Sep 30, 2021

Thank you very much! It very helpful!

@nairacalm
Copy link
Author

nairacalm commented Sep 30, 2021

Thank you very much! It is very helpful!

I'm glad to hear that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment