Skip to content

Set Up phpMyAdmin on a Linux Server – Manage Your Databases via the Web Interface

Discover how to easily manage MySQL and MariaDB databases using phpMyAdmin’s web interface – for efficient database management → Learn more now

12 November 20262 min read8 Views0 helpful

Introduction

phpMyAdmin is a free, web-based tool for managing MySQL and MariaDB databases. It offers a user-friendly interface that allows you to create, edit, manage, and delete databases without manually typing SQL commands.

Installing phpMyAdmin with One-Click Apps

You can install phpMyAdmin directly via One-Click Apps in the dashboard of your dedicated server. After the initial setup of the apps, open the app catalog, search for phpMyAdmin, and start the installation with your preferred project, environment, and domain settings. This gives you a quick and easy way to deploy and manage phpMyAdmin—without manual command-line installation but with integrated web management, support for custom domains, and SSL where available.

Preparation

Before starting the installation, make sure your system is up to date. You can perform pending updates and upgrades with:

Code
sudo apt update -y
sudo apt upgrade -y

Also, ensure that PHP is already installed on your system. PHP is essential for using phpMyAdmin. You can find instructions on how to install PHP in our Install PHP guide.

Warning

Missing PHP Packages If the necessary PHP packages are missing, phpMyAdmin’s PHP files cannot be processed and displayed correctly.

Installation

Once preparation is complete, you can start installing the phpMyAdmin interface. First, open the directory where phpMyAdmin should be installed.

Change to the directory with the command cd /usr/share. Then download the latest phpMyAdmin version into the installation directory using wget:

Code
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip -O phpmyadmin.zip
Warning

If the wget command is not found, you can install it with sudo apt install wget -y.

After the download is complete, unzip the file with:

Code
unzip phpmyadmin.zip
Warning

If the unzip command is not found, install it with sudo apt install unzip -y.

Now rename the extracted archive to a simpler name, delete the ZIP file, and set the necessary permissions:

Code
mv phpMyAdmin-*-all-languages phpmyadmin
rm phpmyadmin.zip; chmod -R 0755 phpmyadmin

Configuration

Web Server Configuration File

Now phpMyAdmin must be integrated into the web server configuration. Create a new configuration file with nano /etc/apache2/conf-available/phpmyadmin.conf and fill it with the following content:

Code
# phpMyAdmin Apache Configuration

Alias /phpmyadmin /usr/share/phpmyadmin

    Options SymLinksIfOwnerMatch
    DirectoryIndex index.php

# For security reasons, deny web access to unnecessary directories

    Require all denied

    Require all denied

    Require all denied

Save the file with CTRL+X, confirm with Y, and press Enter.

Activate and load the new virtual host configuration by running:

Code
a2enconf phpmyadmin
systemctl reload apache2

Create the Required Temporary Directory

For phpMyAdmin to function properly, a temporary directory must be created and the correct permissions set. Do this with:

Code
mkdir /usr/share/phpmyadmin/tmp/
chown -R www-data:www-data /usr/share/phpmyadmin/tmp/

Conclusion

Congratulations, you have successfully installed and configured phpMyAdmin! You can now access the web interface via your server’s IP address and path (http://IP-address/phpmyadmin). If you have any questions or need help, our support team is available daily! 🙂

FAQ

Frequently asked questions

You can install phpMyAdmin directly via One-Click Apps in the dashboard of your dedicated server by searching for phpMyAdmin in the app catalog and starting the installation with your preferred project, environment, and domain settings.
PHP must already be installed on your system, as it is essential for using phpMyAdmin. Missing PHP packages will prevent phpMyAdmin’s PHP files from being processed correctly.
phpMyAdmin is a free, web-based tool for managing MySQL and MariaDB databases with a user-friendly interface, eliminating the need to manually type SQL commands.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.