
- Install phpmyadmin ubuntu server 20.04 install#
- Install phpmyadmin ubuntu server 20.04 update#
- Install phpmyadmin ubuntu server 20.04 software#
- Install phpmyadmin ubuntu server 20.04 password#
htaccess file under the directory /usr/share/phpmyadmin/. Save the file by pressing CTRL + X, then Y and ENTER. Next, add the line AllowOverride All inside the tags just under the line DirectoryIndex index.php. $ sudo nano /etc/apache2/conf-available/nf Open the main phpMyAdmin configuration file using nano. But before you do this, you need to allow the phpMyAdmin to use a. Next, instruct the phpMyAdmin package to only allow authentications from users defined in the /etc/phpmyadmin/.htpasswd file. $ sudo htpasswd /etc/phpmyadmin/.htpasswd EXAMPLE_USER_2 For instance, to create EXAMPLE_USER_2, run the command below. If you'd like to create more users, run the command again without the -c option.
Install phpmyadmin ubuntu server 20.04 password#
$ sudo htpasswd -c /etc/phpmyadmin/.htpasswd EXAMPLE_USERĮnter your preferred password for the EXAMPLE_USER and confirm it to add the new user to the /etc/phpmyadmin/.htpasswd file. It is mandatory to define it when creating the first user.

htpasswd file for you if it doesn't exist. Use the htpasswd utility to create the first user named EXAMPLE_USER. htpasswd file which you will create under the /etc/phpmyadmin/ directory. You'll store hashed authentication details of allowed users in a. In this guide, you'll restrict access to the phpMyAdmin login page using Apache basic authentication. Without an additional layer of security, your login URL can be bombarded by brute-force attacks.
Install phpmyadmin ubuntu server 20.04 software#
While the web-based phpMyAdmin software makes MySQL/MariaDB administration easy for you since you can access it from any computer with an internet connection, it can become a target for hackers. In the next step, you'll harden its security using Apache basic authentication. Your phpMyAdmin software is now in place. As you can see, the sample_db is now among the list of databases that you can access. You should now see the phpMyAdmin dashboard as shown below. Then enter the credentials of the test_user you've just created to log in. Replace 192.0.2.1 with the correct domain name or public IP address of your server. Navigate to the URL below in a web browser to test the installation. MariaDB> GRANT ALL PRIVILEGES on sample_db.* TO identified by 'EXAMPLE_PASSWORD' Mysql> GRANT ALL PRIVILEGES ON sample_db.* TO FLUSH PRIVILEGES mysql> CREATE USER IDENTIFIED WITH mysql_native_password BY 'EXAMPLE_PASSWORD' Use the command for your database engine, either MySQL or MariaDB. mysql> CREATE database sample_db Ĭreate a test_user for the sample_db and exit from the command-line interface. $ sudo mysql -u root -pĮnter your MySQL root password and press ENTER to proceed.Ĭreate a sample_db database.


Log in to your MySQL server as root via the command-line interface. With the phpMyAdmin package installed, you'll create a sample database and a user next to demonstrate the login process via a web browser. Restart Apache to load the new configuration file. $ sudo ln -s /etc/phpmyadmin/nf /etc/apache2/conf-available/nf Use the a2enconf command to enable the new configuration file created by the phpMyAdmin. Repeat the same password to finalize the installation process. When prompted to configure a database for your phpMyAdmin package, choose Yes and press ENTER to proceed.Įnter a strong password for the phpMyAdmin package. When prompted to choose a web server, hit TAB, then ENTER to select apache2 as shown in the screenshot below.
Install phpmyadmin ubuntu server 20.04 install#
$ sudo apt install -y php-json php-mbstring php-zip php-gd php-curl Make sure your system has the following required PHP extensions.
Install phpmyadmin ubuntu server 20.04 update#
SSH to your Ubuntu server and update the package repository index. To proceed with this phpMyAdmin setup, make sure you have the following: In this tutorial, you'll install, configure and secure the phpMyAdmin package with a LAMP stack on your Ubuntu 20.04 LTS server. With its intuitive web interface, phpMyAdmin allows you to import and export data in various formats, including CSV and plain text SQL, making it one of the best GUI-based database management software. You can use it to easily manage databases, tables, indices, users, permissions, and more, without touching the command-line interface. PhpMyAdmin is a web-based open-source database administration tool for MySQL and MariaDB servers.
