phpMyAdmin is a PHP based database administration tool. It allows database management via the GUI web interface as well as executing SQL queries manually. It is a great addition to a LAMP or LEMP server stack. Before proceeding install Apache web server, install PHP and install MySQL / MariaDB database.
Install the packages with pacman.
sudo pacman -S phpmyadmin php-mcrypt
Configure PHP Extension. Open PHP configuration file.
sudo nano /etc/php/php.ini
Verify that extension=mysqli.so and extension=mcrypt.so lines are uncommented. Optionally also uncomment extension=bz2.so and extension=zip.so lines to enable compression support. PHP also needs access to /etc/webapps directory, verify that the directory is present in open_basedir option.
Configure Apache. Create the configuration file for Apache.
sudo nano /etc/httpd/conf/extra/phpmyadmin.conf
Copy the configuration options and save the file.
Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"<Directory "/usr/share/webapps/phpMyAdmin"> DirectoryIndex index.php AllowOverride All Options FollowSymlinks Require all granted</Directory>
Open apache configuration file.
sudo nano /etc/httpd/conf/httpd.conf
Add the line Include conf/extra/phpmyadmin.conf to the file. This will add the configuration file options to Apache configuration.
Restart Apache Server for he changes to take effect.
sudo systemctl restart httpd
You may see The configuration file now needs a secret passphrase (blowfish_secret). error message at the bottom in which case you can add the passphrase in the configuration file.
Open the configuration file.
sudo nano /etc/webapps/phpmyadmin/config.inc.php
Specify the blowfish passphrase with $cfg['blowfish_secret'] variable. The passphrase is a random string of characters for example 6k$L29-2GyxmFr89HLj-vnpqjwnO-7](4$)WL7h}.
Access the web interface in the browser on the current IP address. For example http://192.168.0.100/phpmyadmin/. Log in with the username and password created in MySQL / MariaDB setup. By default the username is root with no password.
Invoke the command line tool.
sudo mysql -u root
Create a new database.
CREATE DATABASE pydio;
Create a new user with a password.
CREATE USER pydio@localhost IDENTIFIED BY '**************';
Grant the user permissions to the database.
GRANT ALL ON pydio.* TO pydio@localhost;
Apply the new permissions.