Page 1 of 1

phpMyAdmin can run in SVR.JS

Posted: August 30th, 2023, 1:57 am
by DorianNiemiecSVRJS
Hi, I got phpMyAdmin (PHP administration interface for MySQL/MariaDB databases) to work in SVR.JS through PHP-CGI! I'm using RedBrick again (as it was in WordPress on PHP-CGI).

Image

Image

Image

Image

How to install phpMyAdmin in SVR.JS then?
  1. Install SVR.JS, RedBrick, MySQL/MariaDB, mysqli connector and PHP-CGI
  2. Add cgi.force_redirect = 0 to your PHP configuration (it's usually located at (slash)etc(slash)php(slash)<php_version>(slash)cgi(slash)php.ini)
  3. Download phpMyAdmin and extract phpMyAdmin files to cgi-bin directory inside SVR.JS web root.
  4. Create user for phpMyAdmin on MySQL/MariaDB console like this:

    Code: Select all

    CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';
    GRANT ALL ON *.* TO 'pma'@'localhost'; 
    
  5. Log in into your phpMyAdmin panel (for example at http[colon]//localhost/cgi-bin/phpMyAdmin-5.2.1-all-languages/index.php)
  6. Navigate to a bottom of the page, click "Find out why" near "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated.", click "Create" in "Create a database named 'phpmyadmin' and setup the phpMyAdmin configuration storage there. ". phpMyAdmin configuration database will be built up.
Now you can administrate your MySQL/MariaDB databases using phpMyAdmin running on SVR.JS and your web browser. You need to be cautious about exposed phpMyAdmin panels though!

EDIT: If you want your phpMyAdmin to be accessible from outside cgi-bin directory, you need to use URL rewriting feature in SVR.JS. You can read about it in SVR.JS documentation.