Have a look at the commands in this tutorial for the installation of PhpMyAdmin on Debian 11 Bullseye using Apache webserver.
PhpMyAdmin is an open-source web-based application that offers a web interface to directly manage and access MySQL or MariaDB databases from anywhere/remotely using a web browser. The user can use the web graphical user interface provided by it to interact with databases without having extensive knowledge of the commands. Hence, even a newbie with some knowledge of computers can manage database tables for querying data and manipulating individual parameters.
Well, like any other popular CMS platform such as WordPress, PhpMyAdmin is also written in PHP programming language used to create dynamic websites by calling up various scripts. This allows the users to not only easily install PhpMyAdmin but also access it locally and remotely. The web interface uses the combination of user and password to authenticate the user – two-factor authentication can increase security.
With this tool, numerous procedures can be carried out using a convenient interface that would otherwise have to be carried out by an administrator using a command line with text input.
If your Debian 11 server is already up to date then leave this step; otherwise, it is recommended to run one of the system update commands to not only get the latest version of the already installed packages but also refresh the system repository cache along with some needed tools.
Well, phpMyAdmin requires Apache webserver to get served over web browser using the local or internet network. Hence, we need to install the same on your Debian 11 server.
Start and enable and check the status of the webserver.
to check the status:
As phpMyAdmin is based on PHP, hence we need to install it along with common extensions.
If you already have a database installed on your Debian 11 server where you are installing phpMyAdmin or you have a Database on any other server which you want to manage using phpMyAdmin then leave these steps otherwise install MariaDB/MySQL.
Start and enable:
Secure Database server:
Once the installation is completed, run the given command to secure your database server.
Go through the guided text-based wizard to secure the MariaDB/MySQL.
Although it is not necessary to create a separate user to access with phpMyAdmin, however, it is recommended to improve the overall security, moreover, after disabling the remote root login, we have to create a new user to access all databases.
Note: Replace user and password with whatever you want to set.
Although we can install PHPMyAdmin directly using the default repository of Debian 11 Bullseye, however, the version will be old. Hence to get the latest one, download its archive file manually using the given command:
Once you have the zipped phpMyAdmin file on your server or system, create some required directories and move the file to an appropriate location for accessing it through the Apache webserver.
Now, create a configuration file by copying the one already present in the phpMyAdmin folder;
Also create a Temporary folder for storage, if not exist.
Generate a secret key to use with phpMyadmin:
Copy the generated key for cookie authentication.
Now, edit the phpMyAdmin configuration file
and past it in the front of line :
$cfg[‘blowfish_secret’] = ‘your-key‘; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Replace your key with the generated one.
Also, scroll down and add this line.
After all, this, Save the file by pressing Ctrl+O, hit the Enter key, and then Ctrl+X to exit.
Change file permissions:
Given access to Apache user to read the files:
Create Apache configuration file
Copy Paste the following lines:
Activate new configuration:
Restart the Apache Webserver
To make the changes apply successfully, restart the Apache webserver.
Enter the server IP-address or domain name along with
/phpmyadmin folder in the browser URL to access this web database management platform.
Note: If you get this notification- The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. Or alternately go to the ‘Operations’ tab of any database to set it up there.
Then simply click on the Find out why link and click the “Create” link to automatically create
Debian, Kali Linux, Ubuntu
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Linux Shout crafted as a part of our main portal H2S Media to publish Linux related tutorials and open source Software.