Installing SQL on Android For Practice SQL commands (CLI and Gui mode)

Опубликовано: 19 Сентябрь 2026
на канале: Shailesh Khandare
75
1

Installing SQL on Android For Practice SQL commands (CLI and Gui mode)

Prerequisites
1.Termux
Install from play store
2.SQL client
nstall from play store

Procedure
1.Install termux and SQL Client
2 .Open termux issue command update
apt-get update
3.Install RDBMS
SQL is language not database , t
So We install rdbms postgresql. By command
pkg install postgresql
4.we doesn't have rooted mobile we could not start simply start 'psql' command
So have to follow this step
1. Create database directory:

mkdir ~/db

initdb ~/db

2. Start postgresql server:

pg_ctl -D ~/db start

3. Create database with specified name:

createdb mydb

4. Connect to it with psql:

psql mydb

Now we can use SQL in CLI mode.

5.If want access in gui mode
First To know which user login database. Put sql prompt
/du
u0_a341
6.open SQL clint
Click +sign then choose PostgreSQL
Name: Postgresql (name connection)
Host:localhost
User:u0_a341
Password: (blank)
Database:mydb

Test connection and back
And open named connection access SQL in gui

Once work done then
Close SQL turmux
/q
Shutdown SQL server
pg_ctl -D ~/db stop

Then close termux enter

exit