Skip to content

Instantly share code, notes, and snippets.

@ShuhaibNC
Last active April 17, 2023 04:23
Show Gist options
  • Select an option

  • Save ShuhaibNC/4300d8cd384c256d004e1f1ae969c18c to your computer and use it in GitHub Desktop.

Select an option

Save ShuhaibNC/4300d8cd384c256d004e1f1ae969c18c to your computer and use it in GitHub Desktop.

How to install PostgresQL in Termux

To create Local Database on your Termux

  • Install the Postgresql Servers first to your Termux.
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 ! Feel free to contact me via Telegram: Contact

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