phpMyAdmin is a web-based interface for managing MySQL and MariaDB databases. It allows administrators to manage databases, users, and tables via an intuitive web interface. Installing phpMyAdmin on openSUSE and SUSE Linux Enterprise Server (SLES) requires adding necessary repositories and configuring services like Apache and PHP.
Since phpMyAdmin is not included in the default repositories, you need to add an external repository such as SUSE Package Hub for SLES or a specific repository for openSUSE. The installation process will also handle dependencies like php-mysql and Apache, but additional configuration is necessary to ensure web access and security.
This guide provides the necessary steps to install and configure phpMyAdmin on openSUSE and SLES.
Steps to install phpMyAdmin on openSUSE and SUSE Linux Enterprise Server (SLES):
- Add the appropriate repository for your system.
$ sudo zypper addrepo https://download.opensuse.org/repositories/openSUSE:Leap:15.2:Update/standard/openSUSE:Leap:15.2:Update.repo $ sudo zypper refresh
- Enable the SUSE Package Hub repository for SLES.
$ SUSEConnect -p PackageHub/15.2/x86_64
- Install phpMyAdmin using zypper.
$ sudo zypper install phpMyAdmin
- Install Apache and PHP if they are not already installed.
$ sudo zypper install apache2 php7 php7-mysql
- Open the Apache configuration file for phpMyAdmin.
$ sudo vi /etc/apache2/conf.d/phpMyAdmin.conf
- Uncomment the Alias line to set the URL path.
Alias /phpmyadmin "/usr/share/phpMyAdmin"
- Change the Require IP rule to allow access from all IP addresses.
Require all granted
- Ensure that the php_mbstring extension is enabled in your php.ini file.
extension=php_mbstring
- Restart the Apache web server to apply the changes.
$ sudo systemctl restart apache2
- Secure the phpMyAdmin installation by adding password protection.
$ htpasswd -c /etc/phpMyAdmin/.htpasswd your_username
- Edit the phpMyAdmin configuration file to enforce authentication.
<Directory "/usr/share/phpMyAdmin"> AuthType Basic AuthName "phpMyAdmin" AuthUserFile /etc/phpMyAdmin/.htpasswd Require valid-user </Directory>
- Restart Apache to apply the security changes.
$ sudo systemctl restart apache2
- Access phpMyAdmin through your browser by visiting the server’s IP or hostname.
http://server_ip_or_hostname/phpmyadmin
- Enter the MySQL or MariaDB root credentials when prompted to log in.
This guide is tested on openSUSE and SLES:
Version | Details |
---|---|
openSUSE Leap 15.2 | Supported |
openSUSE Tumbleweed | Supported |
SLES 15.x | Requires SUSE Package Hub |

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.