How To Install PhpMyAdmin In Termux Android?
Poated on byCategories Android PHP Termux Web Development
PhpMyAdmin in Termux enables easy database management on Android. Graphical interface, efficient admin tasks, and no need for complex commands.
Table of Contents
What Is PhpMyAdmin?
PhpMyAdmin is a popular web-based Graphical User Interface tool written in PHP which used for managing and administering MySQL or MariaDB databases. It allows users to interact with the databases using a user-friendly interface rather than using command-line tools.

PhpMyAdmin Features
- Intuitive web interface.
- Supports most MySQL Features.
- Import data from CSV, SQL.
- Export data to various format.
- Create graphical layout of database in various formats.
- Create complex queries (Query-by-example).
- And much more – read official documentation.
Install PhpMyAdmin In Termux
Pre Requirements.
- Termux – You need to install Termux Application on your Android device and all the stuff will be installed in Termux. Download Termux.
- PHP – Since PhpMyAdmin is written in PHP, you need to install it. Read here for PHP installation in Termux.
- MariaDB – PhpMyAdmin just provide GUI for MySQL or MariaDB, so you must install MariaDB. Read MariaDB MySQL Server installation in Termux.
In sort you need to install these three packages, php, phpmyadmin and mariadb.
Installation
Open Termux and update Termux repository. by this way you can always get latest packages.
pkg update && pkg upgrade
Or
pkg upd; pkg upg
Install necessary packages by running.
pkg install php phpmyadmin mariadb
Or
pkg i php phpmyadmin mariadb
Now all necessary packages will be installed in Termux.
The path for PhpMyAdmin is…
$PREFIX/share/phpmyadmin
That is..
/data/data/com.termux/files/usr/share/phpmyadmin/
Configuration
In Termux you can access MariaDB Server using the PhpMyAdmin. So you have to configure it for MariaDB. MariaDB Server runs on post 3306 and you need to add it in phpmyadmin configuration file.
Goto phpmyadmin directory.
cd $PREFIX/share/phpmyadmin
Open config.inc.php file in nano text editor and change host from localhost to localhost:3306
nano config.inc.php
Find the configuration host and add port 3306 after localhost
$cfg['Servers'][$i]['host'] = 'localhost:3306;
In case your MariaDB MySQL account has no password then change ‘AllowNoPassword’ value from false to true.

$cfg['Servers'][$i]['AllowNoPassword'] = true;
[Important] Read How To Install MariaDB MySQL Server In Termux Android? If you have not installed MariaDB MySQL Server.
Uasage
After installtion and configuration process is completed you can use PHPMyAdmin by starting PHP and MariaDB Servers.
Start MariaDB Server in background.
mysqld_safe &
Start PHP Server in PHPMyAdmin directory.
php -S localhost:8080 -t $PREFIX/share/phpmyadmin/
Boom! Now you can access phpmyadmin on your browser. Open Google Chrome and open the link http://localhost:8080


Conclusion
In conclusion, PHPMyAdmin is the best MySQL management system because it easily works with web applications. It has a user-friendly interface, so you don’t need to remember commands for actions. With its control panel, you can import and export data in various formats. And so much more. You can learn more about its feature and other thing on it’s official website.
0 Comment on 'How To Install PhpMyAdmin In Termux Android?'