Skip to content

Instantly share code, notes, and snippets.

@tamecalm
Created August 16, 2019 22:36
Show Gist options
  • Save tamecalm/c0b392cf15e8a656ffeb3b62a116d129 to your computer and use it in GitHub Desktop.
Save tamecalm/c0b392cf15e8a656ffeb3b62a116d129 to your computer and use it in GitHub Desktop.
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

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

psql -U myDatabaseUsername -d myDatabaseName

@elenakrittik
Copy link

Thank you very much! It very helpful!

@tamecalm
Copy link
Author

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