como-instalar-phpmyadmin-en-raspberry-pi

How to install PHPMyAdmin on Raspberry Pi

  • 1 min

In this post, we are going to see how to install PHPMyAdmin on a Debian-based operating system like Raspbian on Raspberry Pi.

PHPMyAdmin is a popular free tool for easy management of MySQL/MariaDB databases through a web interface.

Installing PHPMyAdmin on Raspberry Pi is very simple. First, you should have a web server like Apache with PHP and a database like MariaDB installed.

To install PHPMyAdmin from a command console, we do:

sudo apt update sudo apt install phpmyadmin php-mbstring php-gettext

We will be asked a series of questions to configure PHPMyAdmin. First, we select apache2 as the server by pressing SPACE and then ENTER.

Next, we will be asked for the password for the database ‘root’, and a password to access PHPMyAdmin.

Now we create a new user in the database, which we will use with PHPMyAdmin. To do this, we access MariaDB as root.

sudo mariadb -u root -p

And we use the following command to create a user ‘username’ with password ‘password’ (replace with your desired data).

GRANT ALL PRIVILEGES ON . TO ‘username’@‘localhost’ IDENTIFIED BY ‘password’;

We exit the MariaDB console by doing:

quit

Finally, we restart Apache by doing:

sudo service apache2 restart

Now we can check that everything is working correctly by opening a web browser and going to the address:

IP/phpmyadmin

raspberry-pi-phpmyadmin-funcionamiento

That’s how simple it is. PHPMyAdmin is very popular and is included in many server installations. In the next post, we will see how to install DBeaver, another popular MySQL/MariaDB client. See you soon!