Install phpMyAdmin

When using Dietpi Operating System, phpMyAdmin is one of the components which can be installed using dietpi-software framework.

Alternatively, what follows can be used:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install phpmyadmin

Select the Webserver

Select Apache2

Configuring phpMyAdmin

Select Yes

Define a password for user phpMyAdmin. Preferably, should be different from root password for security reasons.

Then, create a user for phpMyAdmin, as root user cannot be a phpMyAdmin user.

Create a user and permit it to access all databases on the MySQL server by running the following command:

mysql -uroot -ppassword

use mysql;

CREATE USER username@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

FLUSH PRIVILEGES;

Close mysql.

Apache2 configuration for phpMyAdmin

Open Apache2 configuration file and add what follows at the end of the file.

sudo nano /etc/apache2/apache2.conf

add:

Include /etc/phpmyadmin/apache.conf

CTRL+x – Y. Close and Save the file. And restart apache2.

sudo service apache2 restart

phpMyAdmin webpage is available at

“192.168.86.160:88/phpmyadmin/index.php” in a web-browser

In case a lot of errors are generated while browsing the contents of databases, apply the following modification:

inside /etc/phpmyadmin/config.inc.php file insert the following:

$cfg['SendErrorReports'] = 'never';

To extend the time-out before which phpMyAdmin will logout:

Home->Settings->Features and modify Log Cookies Validity