Sudo apt install certbot python3-certbot-nginx Install the Let’s Encrypt client from Ubuntu 18.04 software repository like below: To secure the PHPMyAdmin web interface, we can install a free Let’s Encrypt TLS certificate. Before entering user credentials in the login form, let’s enable HTTPS. You can use Google Chrome to visit the phpMyAdmin web interface. Note that phpMyAdmin will not work in recent versions of Firefox. Now you should be able to access phpMyAdmin web interface via If the test is successful, reload Nginx for the changes to take effect. Your phpMyAdmin files are in /usr/share/phpmyadmin/ directory. Index index.php index.html index.htm Īccess_log /var/log/nginx/phpmyadmin_access.log Įrror_log /var/log/nginx/phpmyadmin_error.log įastcgi_pass unix:/run/php/ įastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name Replace with your actual sub-domain and don’t forget to create an A record for it. We will configure it so that we can access phpMyAdmin via a sub-domain. To be able to access the phpMyAdmin web interface, we need to create an Nginx server block by running the following command. Show grants for you can see, user PHPMyAdmin has all privileges on database PHPMyAdmin. You can use the following command to log into the MariaDB server. If you are curious as I am, you can log into MariaDB and check what privileges PHPMyAdmin user has been granted. Once done, a new database named PHPMyAdmin is created and the database user PHPMyAdmin has necessary privileges to manage this database. Next, select Yes to create a new database and let dbconfig-common to configure it. Nginx isn’t in the list, so press the Tab key and hit OK to skip this step. The phpMyAdmin package is included in Ubuntu 18.04 software repository, so we can easily install it with the following command.ĭuring the installation, it will prompt you to select a web server to configure. I assumed that you have already installed Ubuntu 18.04 with Nginx, MariaDB and PHP7.4, if not, please check out this tutorial. This tutorial will be showing you how to install phpMyAdmin with two-factor authentication using Nginx, MariaDB and PHP7.4 on Ubuntu 18.04. Sudo nano /etc/nginx/snippets/phpmyadmin.In order to follow this guide, you should have a server with Ubuntu 18.04.4 LTS installed with 1GB minimal memory, 10GB minimal hard drive, access to sudo privileges, Nginx, MariaDB and PHP7.4. In Nginx, virtual host file can be found in etc/nginx/snippets directory. Start by logging in to the MySQL server as the root user: sudo mysqlįrom within the MySQL shell execute the following commands which will create a new administrative user and grant appropriate permissions: CREATE USER IDENTIFIED BY 'change-with-your-secure-password' GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION You will be prompted to confirm the password, enter the same password, select OK and press Enter. Select Yes and hit Enter.Įnter a password for phpMyAdmin to register with the database, select OK and press Enter. Next, the installer will ask you whether you want to use dbconfig-common tool to set up the database. We’ll configure Nginx in the next section. There is no option to choose Nginx, press TAB to select OK and then Enter. The installer will ask you to choose the web server that should be automatically configured to run phpMyAdmin. Use this command to install phpmyadmin on Ubuntu 18.04: Installing phpMyAdmin on Ubuntu 18.04 LTS. First, make sure that all your system packages are up-to-date I will show you through the step by step installation phpMyAdmin with Nginx on an Ubuntu 18.04 LTS (Bionic Beaver) server. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages. It provides a user friendly web interface to access and manage your databases. PhpMyAdmin is a web-based client written in php for managing MySQL and MariaDB databases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |