{"id":8745,"date":"2020-07-01T07:47:44","date_gmt":"2020-07-01T11:47:44","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=8745"},"modified":"2021-12-04T08:25:03","modified_gmt":"2021-12-04T08:25:03","slug":"install-latest-phpmyadmin-ubuntu-20-04","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/install-latest-phpmyadmin-ubuntu-20-04\/","title":{"rendered":"How to Install the Latest phpMyAdmin on Ubuntu 20.04"},"content":{"rendered":"\n
This tutorial will guide you in your quest to install the latest phpMyAdmin on your Ubuntu system.<\/p>\n\n\n\n
phpMyadmin is probably the best freely available web-based MySQL<\/a> and MariaDB<\/a> administration application. You can download and install on your server running PHP and a server like Apache<\/a>, Nginx<\/a>, or IIS<\/a> among others.<\/p>\n\n\n\n We are assuming you already have installed the MySQL server on your Ubuntu<\/a> system. In this case, we will be using Ubuntu 20.04. We will also assume you have Apache, PHP<\/a>, and a non-root user with sudo<\/em> privileges, as well as a firewall configured with ufw<\/em>. This tutorial about the LAMP stack<\/a> will help you install the necessary prerequisites.<\/p>\n\n\n\n We will also recommend you have an existing domain configured with an SSL\/TLS certificate. This is because phpMyAdmin communicates directly with your MySQL installation, uses MySQL credentials to authenticate as well as create users, databases, and their objects, as well as executes and returns results for SQL queries.<\/p>\n\n\n\n If you have the above in place you are ready to proceed.<\/p>\n\n\n\n PhpMyAdmin can be installed from the default Ubuntu repositories. This will not install the latest available phpMyAdmin version. The steps to install the latest phpMyAdmin will be highlighted later in this tutorial.<\/p>\n\n\n\n The process involves updating your server’s package index and then using apt install them on your Ubuntu system. Use the following commands:<\/p>\n\n\n\n php-mbstring<\/em> and php-gettext<\/em> extensions will only be installed if they are not already installed.<\/p>\n\n\n\n Follow the prompts in order to configure your installation correctly with the following hints:<\/p>\n\n\n\n The phpMyAdmin Apache configuration file will be added to the \/etc\/apache2\/conf-enabled\/<\/em> directory.<\/p>\n\n\n\n You may need to explicitly enable the mbstring<\/strong> PHP extension if it has not been previously enabled. This can be done by running the following command:<\/p>\n\n\n\n Restart Apache for your changes to be saved:<\/p>\n\n\n\n phpMyAdmin is now installed and configured. Be sure to make sure MySQL users have the privileges required.<\/p>\n\n\n\n let’s take a diversion to install the latest phpMyAdmin on your Ubuntu system seeing the above procedure does not give us the latest version.<\/p>\n\n\n\n Download the latest phpMyAdmin<\/a> archive from the official download page here<\/a>. Also, visit the page to determine the latest version which is currently phpMyAdmin 5.0.2 at the initial publishing of this tutorial.<\/p>\n\n\n\n Use the following commands to download phpMyAdmin 5.0.2 onto your system.<\/p>\n\n\n\n If wget<\/strong> or unzip<\/strong> are missing you can install them using the apt<\/em> install command.<\/p>\n\n\n\n Next, create a tmp directory and set the proper permissions.<\/p>\n\n\n\n Next, you need to configure webserver to serve phpMyAdmin over the network by creating an Apache configuration file for phpMyAdmin:<\/p>\n\n\n\n Add the content below to the configuration file you have just created.<\/p>\n\n\n\n Save and close the file, enable the configuration, and restart apache to pick up the new changes using the following commands:<\/p>\n\n\n\n You now have the latest phpMyAdmin on your Ubuntu system which can be accessed through the server IP address or domain name.<\/p>\n\n\n\n From this point onwards, whether you used the default Ubuntu 20.04 phpMyAdmin or you opted to go for the latest version, everything is pretty much the same from here on.<\/p>\n\n\n\nPrerequisites<\/h2>\n\n\n\n
Default Step (Optional) \u2014 Installing phpMyAdmin<\/h2>\n\n\n\n
$ sudo apt update\n$ sudo apt install phpmyadmin php-mbstring php-gettext<\/code><\/pre>\n\n\n\n
$ sudo phpenmod mbstring<\/code><\/pre>\n\n\n\n
$ sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n
Step 1: Install the Latest phpMyAdmin on Ubuntu 20.04<\/h2>\n\n\n\n
$ wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/5.0.2\/phpMyAdmin-5.0.2-all-languages.zip\n$ unzip phpMyAdmin-5.0.2-all-languages.zip\n$ mv phpMyAdmin-5.0.2-all-languages \/usr\/share\/phpmyadmin<\/code><\/pre>\n\n\n\n
$ mkdir \/usr\/share\/phpmyadmin\/tmp\n$ chown -R www-data:www-data \/usr\/share\/phpmyadmin\n$ chmod 777 \/usr\/share\/phpmyadmin\/tmp<\/code><\/pre>\n\n\n\n
Step 2: Configure phpMyAdmin<\/h2>\n\n\n\n
$ sudo nano \/etc\/apache\/conf-available\/phpmyadmin.conf<\/code><\/pre>\n\n\n\n
Alias \/phpmyadmin \/usr\/share\/phpmyadmin\nAlias \/phpMyAdmin \/usr\/share\/phpmyadmin\n \n<Directory \/usr\/share\/phpmyadmin\/>\n AddDefaultCharset UTF-8\n <IfModule mod_authz_core.c>\n <RequireAny>\n Require all granted\n <\/RequireAny>\n <\/IfModule>\n<\/Directory>\n \n<Directory \/usr\/share\/phpmyadmin\/setup\/>\n <IfModule mod_authz_core.c>\n <RequireAny>\n Require all granted\n <\/RequireAny>\n <\/IfModule>\n<\/Directory><\/code><\/pre>\n\n\n\n
$ sudo a2enconf PHPMyAdmin\n$ sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n
http:\/\/example.com\/phpmyadmin<\/code><\/pre>\n\n\n\n