PhpMyAdmin in Termux enables easy database management on Android. Graphical interface, efficient admin tasks, and no need for complex commands.
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.
In sort you need to install these three packages, php, phpmyadmin and mariadb.
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/
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.
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
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.