![]() # METHOD can be “trust”, “reject”, “md5”, “password”, “scram-sha-256”, # or “samenet” to match any address in any subnet that the server is # can write “samehost” to match any of the server’s own IP addresses, # Alternatively, you can write an IP address and netmask in separate # that starts with a dot (.) matches a suffix of the actual host name. # specifies the number of significant bits in the mask. ![]() # an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that # host name, or it is made up of an IP address and a CIDR mask that is # ADDRESS specifies the set of hosts the record matches. # you can also write a file name prefixed with to include names # USER can be “all”, a user name, a group name prefixed with “+”, or a # must be enabled in a separate record (see example below). # database name, or a comma-separated list thereof. # DATABASE can be “all”, “sameuser”, “samerole”, “replication”, a # GSSAPI-encrypted TCP/IP socket, while “hostnogssenc” uses a # “hostssl” is an SSL-encrypted TCP/IP socket, and “hostnossl” is a # socket, “host” is either a plain or SSL-encrypted TCP/IP socket, # The first field is the connection type: “local” is a Unix-domain ![]() # (The uppercase items must be replaced by actual values.) # hostnogssenc DATABASE USER ADDRESS METHOD # hostgssenc DATABASE USER ADDRESS METHOD # hostnossl DATABASE USER ADDRESS METHOD # are authenticated, which PostgreSQL user names they can use, which # This file controls: which hosts are allowed to connect, how clients # documentation for a complete description of this file. # Refer to the “Client Authentication” section in the PostgreSQL # PostgreSQL Client Authentication Configuration File If you’re facing any issue, kindly post it in the comment box below. If the command executes successfully, it will show the prompt: mydb=#įrom here, you can now start switching/creating databases and executing as many sql queries as you want. “mydb” is the name I chose for my database. To create your own database, simply enter the command: createdb mydb Let’s first get a list of databases that comes with the installation on the server. We are now done with how to start and stop our postgresql server, let’s now move on to connecting to the server and creating a sample database. Now you can test out the aliases we made by typing the start alias you configured earlier and the stop alias to see if they are working as they should. You can change “pgstart” and “pgstop” to any name you like, It’s what you will type when you want to start or stop the postgresql server.Īfter adding the lines, press Ctrl-O on you keyboard to write out to the file, Enter to confirm the name and save, then Ctrl-X to exit.īefore our aliases can work, we have to refresh the. ![]() bash_aliasesĪdd the following lines to the file: alias pgstart="pg_ctl -D $PREFIX/var/lib/postgresql start"Īlias pgstop="pg_ctl -D $PREFIX/var/lib/postgresql stop" bash_aliases file with nano(you can also use vim): nano. Navigate to your Home directory on the terminal: cd ~/ So what do you think we can do about this, hmmm, I’m thinking aliases, yes, aliases. Imagine typing this command every time you have to start your server. Our server starts, but there is a problem, I’m guessing you figured it out already, the command above is too long. Now lets start the postgresql server: pg_ctl -D $PREFIX/var/lib/postgresql start With that done, you have everything setup already. Execute the command below in the terminal: pkg install postgresqlĪfter installing, you must setup Postgresql by executing the commands below: mkdir -p $PREFIX/var/lib/postgresql Are you curious like me? Have you ever thought if it were possible to run a postgresql server on your smartphone? If you are and have, then I guess your present coordinates on the web are correct.īefore I continue, please note that this is strictly for Android smartphones.Īlso, make sure you have the app Termux installed from Google Playstore.įirst, let’s make sure Postgresql is installed on Termux. ![]()
0 Comments
Leave a Reply. |