Termux

 Termux is a free and open-source emulator for Android which allows for running a Linux environment on an Android device. The link below is a YouTube tutorial on using Termux to support a MariaDB server with phpMyAdmin.

Termux phpMyAdmin

I am using Termux on my mobile and tablet to install and test MariaDB, Python, SQL, etc. in addition to my PC. So far I have been able to install Termux from Google Play Store, install MariaDB and phpMyAdmin and am able to use it with a browser to work on the database via the localhost. The following tutorial outline the steps I used. 

I was unable to install Termux on Bluestacks (Android simulator) in Win 11 on my laptop.

Step 1 - Install Termux on your mobile device from Google Play Store and > Open the application.



At the  - $ prompt enter: apt update && apt upgrade -y

Next enter - $ apt install php mariadb phpmyadmin -y

Your current working directory is the termux home directory. Go to the root directory/file system dir with "cd .." You should get: .../com.termux/files $ _

Type in: "cd usr/share" and your folder will now be: .../usr/share $ _

Type in: "ls" and you can see the phpmyadmin directory.



Type in: "cd phpmyadmin" and your folder will now be: .../usr/share/phpmyadmin $ _

Start the php server by typing: php -S localhost:8080 enter. You will be told that the web server at the localhost has started. 

Launch a browser and type in: localhost:8080 enter and you should get the phpmyadmin login screen. If you enter root and a password it will tell you that MariaDB is not running. Stope the web server with CTRL+C and clear

Type in: "mysqld --skip-grant-tables --general-log &" to start the mysql daemon program and server.

Move back to the phpmyadmin directory:  .../usr/share/phpmyadmin $ _ and start the php web server using the start php server command: php -S localhost:8080 enter. You will be told that the web server at the localhost has started. 

Launch a browser and enter: "localhost:8080" and the phpMyAdmin login screen will be displayed. Enter your username and password for your server to login.



To stop the server: "killall -9 mysqld"

Note: in phpmyadmin directory there is a php config file that you may need to change 'localhost' to '127.0.0.1' to connect from a browser. The file is config.inc.php






Comments

Popular posts from this blog

LibreBase to MariaDB (MySQL) on Synology NAS Drive DS923+

CRUD - CodeIgnighter & Grocery-CRUD

Installing RaspberryPi Desktop on Acer AspireOne Intel Atom Laptop