{"id":22522,"date":"2024-05-12T21:47:25","date_gmt":"2024-05-12T18:47:25","guid":{"rendered":"https:\/\/kifarunix.com\/?p=22522"},"modified":"2024-05-13T08:55:11","modified_gmt":"2024-05-13T05:55:11","slug":"how-to-install-phpmyadmin-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-phpmyadmin-on-ubuntu-24-04\/","title":{"rendered":"How to Install phpMyAdmin on Ubuntu 24.04"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install phpMyAdmin on Ubuntu 24.04. <a href=\"https:\/\/www.phpmyadmin.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">phpMyAdmin<\/a> is a free and opensource application written in PHP that<em> <\/em>facilitates the administration and management of MySQL and MariaDB databases over the Web.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-php-my-admin-on-ubuntu-24-04\">Installing phpMyAdmin on Ubuntu 24.04<\/a><ul><li><a href=\"#what-are-the-common-uses-of-php-my-admin\">What are the common Uses of phpMyAdmin<\/a><\/li><li><a href=\"#prerequisites-for-installing-php-my-admin\">Prerequisites for Installing phpMyAdmin<\/a><ul><li><a href=\"#install-lamp-stack-on-ubuntu-24-04\">Install LAMP Stack on Ubuntu 24.04<\/a><\/li><li><a href=\"#install-required-php-modules\">Install Required PHP Modules<\/a><\/li><\/ul><\/li><li><a href=\"#install-php-my-admin\">Install phpMyAdmin<\/a><\/li><li><a href=\"#create-database-and-database-user-for-php-my-admin\">Create Database and Database User for phpMyAdmin<\/a><\/li><li><a href=\"#import-the-initial-php-my-admin-structure-and-data\">Import the initial phpMyAdmin structure and Data<\/a><\/li><li><a href=\"#define-php-my-admin-access-credentials\">Define phpMyAdmin Access Credentials<\/a><\/li><li><a href=\"#update-apache-virtual-host-for-php-my-admin\">Update Apache VirtualHost for phpMyAdmin<\/a><\/li><li><a href=\"#php-my-admin-database-details\">phpMyAdmin Database Details<\/a><\/li><li><a href=\"#restart-apache-http-service\">Restart Apache HTTP Service<\/a><\/li><li><a href=\"#open-http-https-port-on-firewall\">Open HTTP\/HTTPS port on Firewall<\/a><\/li><li><a href=\"#accessing-php-my-admin-on-ubuntu-24-04\">Accessing phpMyAdmin on Ubuntu 24.04<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-php-my-admin-on-ubuntu-24-04\">Installing phpMyAdmin on Ubuntu 24.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-are-the-common-uses-of-php-my-admin\">What are the common Uses of phpMyAdmin<\/h3>\n\n\n\n<p>phpMyAdmin allows administrators to;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>browse through databases and tables;<\/li>\n\n\n\n<li>create, copy, rename, alter and drop databases;<\/li>\n\n\n\n<li>create, copy, rename, alter and drop tables;<\/li>\n\n\n\n<li>perform table maintenance;<\/li>\n\n\n\n<li>add, edit and drop fields;<\/li>\n\n\n\n<li>execute any SQL-statement, even multiple queries;<\/li>\n\n\n\n<li>create, alter and drop indexes;<\/li>\n\n\n\n<li>load text files into tables;<\/li>\n\n\n\n<li>create and read dumps of tables or databases;<\/li>\n\n\n\n<li>export data to SQL, CSV, XML, Word, Excel, PDF and LaTeX formats;<\/li>\n\n\n\n<li>administer multiple servers;<\/li>\n\n\n\n<li>manage MySQL users and privileges;<\/li>\n\n\n\n<li>check server settings and runtime information with configuration hints;<\/li>\n\n\n\n<li>check referential integrity in MyISAM tables;<\/li>\n\n\n\n<li>create complex queries using Query-by-example (QBE), automatically<br>connecting required tables;<\/li>\n\n\n\n<li>create PDF graphics of database layout;<\/li>\n\n\n\n<li>search globally in a database or a subset of it;<\/li>\n\n\n\n<li>transform stored data into any format using a set of predefined<br>functions, such as displaying BLOB-data as image or download-link;<\/li>\n\n\n\n<li>manage InnoDB tables and foreign keys;<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites-for-installing-php-my-admin\">Prerequisites for Installing phpMyAdmin<\/h3>\n\n\n\n<p>Since phpMyAdmin is a web based tool for administering MySQL or MariaDB, and is written on PHP, the most <a href=\"https:\/\/docs.phpmyadmin.net\/en\/latest\/require.html\" target=\"_blank\" rel=\"noreferrer noopener\">basic requirement<\/a> that you need is either a LAMP or LEMP Stack. This demo uses the former.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-lamp-stack-on-ubuntu-24-04\">Install LAMP Stack on Ubuntu 24.04<\/h4>\n\n\n\n<p>We have describe extensively how to install LAMP stack on Ubuntu 24.04 in our previous guide whose link is provided below;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>L: <a href=\"https:\/\/kifarunix.com\/install-ubuntu-24-04-on-virtualbox\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Ubuntu 24.04 on VirtualBox<\/a><\/li>\n\n\n\n<li>A: <a href=\"https:\/\/kifarunix.com\/install-lamp-stack-on-ubuntu-24-04\/#install-apache-web-server-on-ubuntu-24-04\" target=\"_blank\" rel=\"noreferrer noopener\">Install Apache Web Server on Ubuntu 24.04<\/a> . You can use Nginx instead.<\/li>\n\n\n\n<li>M: <a href=\"https:\/\/kifarunix.com\/how-to-install-mariadb-11-on-ubuntu-24-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install MariaDB 11 on Ubuntu 24.04<\/a><\/li>\n\n\n\n<li>P: <a href=\"https:\/\/kifarunix.com\/install-lamp-stack-on-ubuntu-24-04\/#install-php-on-ubuntu-24-04\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install PHP 8 on Ubuntu 24.04<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-required-php-modules\">Install Required PHP Modules<\/h4>\n\n\n\n<p>Install other required PHP modules for phpMyAdmin;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install php-{bz2,mbstring,zip,gd,curl,xml,common,opcache,imagick}<\/pre>\n\n\n\n<p>See list of requirements on <a href=\"https:\/\/docs.phpmyadmin.net\/en\/latest\/require.html\" target=\"_blank\" rel=\"noreferrer noopener\">phpMyAdmin requirements page<\/a>.<\/p>\n\n\n\n<p>Similarly, ensure Apache PHP modules are installed;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install libapache2-mod-php<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php-my-admin\">Install phpMyAdmin<\/h3>\n\n\n\n<p>phpMyAdmin 5.2.1, which is the current latest stable release version as of this writing, is available on the default Ubuntu 24.04 repos. You can install it as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install phpmyadmin<\/code><\/pre>\n\n\n\n<p>When prompted to choose a web server to use, you can select Apache or whichever you want, from the available options.<\/p>\n\n\n\n<p>Similarly, if the installer prompts you to create its database\/user, you can choose to or you can choose to create it later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-database-and-database-user-for-php-my-admin\">Create Database and Database User for phpMyAdmin<\/h3>\n\n\n\n<p>If the installer didn&#8217;t prompt you to create or you skipped the database creation during the installation process, you can create your phpMyAdmin database and database user. Replace the database name, user and password accordingly.<\/p>\n\n\n\n<p>Create&nbsp;<strong><code>phpmyadmin<\/code><\/strong>&nbsp;database;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb-admin -u root -p create phpmyadmin<\/code><\/pre>\n\n\n\n<p>Create database user for phpMyAdmin database;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb -u root -p -e \"GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'ChangeME';\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"import-the-initial-php-my-admin-structure-and-data\">Import the initial phpMyAdmin structure and Data<\/h3>\n\n\n\n<p>Run the SQL script to create tables and other structures necessary for the <code>phpmyadmin<\/code> application to function correctly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb -u root -p phpmyadmin &lt; \/usr\/share\/phpmyadmin\/sql\/create_tables.sql<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"define-php-my-admin-access-credentials\">Define phpMyAdmin Access Credentials<\/h3>\n\n\n\n<p>Rename the sample phpMyAdmin configuration file;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cp \/usr\/share\/phpmyadmin\/config{.sample,}.inc.php<\/pre>\n\n\n\n<p>Edit the config,\u00a0<strong><code>\/usr\/share\/phpmyadmin\/config.inc.php<\/code><\/strong>, and uncomment the lines below and update them with your database connection username\/password;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/usr\/share\/phpmyadmin\/config.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ $cfg&#91;'Servers']&#91;$i]&#91;'controluser'] = 'pma';\n\/\/ $cfg&#91;'Servers']&#91;$i]&#91;'controlpass'] = 'pmapass';<\/code><\/pre>\n\n\n\n<p>Update them with your database logins created above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$cfg&#91;'Servers']&#91;$i]&#91;'controluser'] = 'phpmyadmin';\n$cfg&#91;'Servers']&#91;$i]&#91;'controlpass'] = 'ChangeME';<\/code><\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"update-apache-virtual-host-for-php-my-admin\">Update Apache VirtualHost for phpMyAdmin<\/h3>\n\n\n\n<p>The installer automatically creates and enable Apache virtual host configuration file for phpMyAdmin as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cat \/etc\/apache2\/conf-available\/phpmyadmin.conf<\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n# phpMyAdmin default Apache configuration\n\nAlias \/phpmyadmin \/usr\/share\/phpmyadmin\n\n&lt;Directory \/usr\/share\/phpmyadmin>\n    Options SymLinksIfOwnerMatch\n    DirectoryIndex index.php\n\n    # limit libapache2-mod-php to files and directories necessary by pma\n    &lt;IfModule mod_php7.c>\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/usr\/share\/doc\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/:\/usr\/share\/javascript\/\n    &lt;\/IfModule>\n\n    # PHP 8+\n    &lt;IfModule mod_php.c>\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/usr\/share\/doc\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/:\/usr\/share\/javascript\/\n    &lt;\/IfModule>\n\n&lt;\/Directory>\n\n# Disallow web access to directories that don't need it\n&lt;Directory \/usr\/share\/phpmyadmin\/templates>\n    Require all denied\n&lt;\/Directory>\n&lt;Directory \/usr\/share\/phpmyadmin\/libraries>\n    Require all denied\n&lt;\/Directory>\n<\/code><\/pre>\n\n\n\n<p>You can update it if need be!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php-my-admin-database-details\">phpMyAdmin Database Details<\/h3>\n\n\n\n<p>If you used phpMyAdmin dbconfig-common tool to create the database, you should be able to get these details on the MariaDB database server.<\/p>\n\n\n\n<p>Thus, login and check;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>show databases;<\/code><\/pre>\n\n\n\n<pre class=\"scroll-sz\"><code>\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| phpmyadmin         |\n| sys                |\n+--------------------+\n5 rows in set (0.000 sec)\n<\/code><\/pre>\n\n\n\n<p>Check tables;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>use phpmyadmin;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>show tables;<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n+------------------------+\n| Tables_in_phpmyadmin   |\n+------------------------+\n| pma__bookmark          |\n| pma__central_columns   |\n| pma__column_info       |\n| pma__designer_settings |\n| pma__export_templates  |\n| pma__favorite          |\n| pma__history           |\n| pma__navigationhiding  |\n| pma__pdf_pages         |\n| pma__recent            |\n| pma__relation          |\n| pma__savedsearches     |\n| pma__table_coords      |\n| pma__table_info        |\n| pma__table_uiprefs     |\n| pma__tracking          |\n| pma__userconfig        |\n| pma__usergroups        |\n| pma__users             |\n+------------------------+\n19 rows in set (0.001 sec)\n<\/code><\/pre>\n\n\n\n<p>You can get the credentials in the file <strong><code>\/etc\/phpmyadmin\/config-db.php<\/code><\/strong>, if you did define create them during the installation. Otherwise, edit the file and update the phpMyAdmin access details.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/etc\/phpmyadmin\/config-db.php<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n&lt;?php\n##\n## database access settings in php format\n## automatically generated from \/etc\/dbconfig-common\/phpmyadmin.conf\n## by \/usr\/sbin\/dbconfig-generate-include\n##\n## by default this file is managed via ucf, so you shouldn't have to\n## worry about manual changes being silently discarded.  *however*,\n## you'll probably also want to edit the configuration file mentioned\n## above too.\n##\n<strong>$dbuser='phpmyadmin';\n$dbpass='ChangeME';<\/strong>\n$basepath='';\n$dbname='phpmyadmin';\n$dbserver='localhost';\n$dbport='3306';\n$dbtype='mysql';\n<\/code><\/pre>\n\n\n\n<p>The installer also creates a phpMyAdmin configuration with the content below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo cat \/etc\/phpmyadmin\/config.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n&lt;?php\n\/**\n * Debian local configuration file\n *\n * This file overrides the settings made by phpMyAdmin interactive setup\n * utility.\n *\n * For example configuration see\n *   \/usr\/share\/doc\/phpmyadmin\/examples\/config.sample.inc.php\n * or\n *   \/usr\/share\/doc\/phpmyadmin\/examples\/config.manyhosts.inc.php\n *\n * NOTE: do not add security sensitive data to this file (like passwords)\n * unless you really know what you're doing. If you do, any user that can\n * run PHP or CGI on your webserver will be able to read them. If you still\n * want to do this, make sure to properly secure the access to this file\n * (also on the filesystem level).\n *\/\n\nif (!function_exists('check_file_access')) {\n    function check_file_access(string $path): bool\n    {\n        if (is_readable($path)) {\n            return true;\n        }\n\n        if (! file_exists($path)) {\n            return false;\n        }\n\n        error_log(\n            'phpmyadmin: Failed to load ' . $path\n            . ' Check group www-data has read access and open_basedir restrictions.'\n        );\n        return false;\n    }\n}\n\n\/\/ Load secret generated on postinst\nif (check_file_access('\/var\/lib\/phpmyadmin\/blowfish_secret.inc.php')) {\n    require('\/var\/lib\/phpmyadmin\/blowfish_secret.inc.php');\n}\n\n\/**\n * Server(s) configuration\n *\/\n$i = 0;\n\/\/ The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].\n\/\/ You can disable a server config entry by setting host to ''.\n$i++;\n\n\/**\n * Read configuration from dbconfig-common\n * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin\n *\/\nif (check_file_access('\/etc\/phpmyadmin\/config-db.php')) {\n    require('\/etc\/phpmyadmin\/config-db.php');\n}\n\n\/* Configure according to dbconfig-common if enabled *\/\nif (!empty($dbname)) {\n    \/* Authentication type *\/\n    $cfg['Servers'][$i]['auth_type'] = 'cookie';\n    \/* Server parameters *\/\n    if (empty($dbserver)) $dbserver = 'localhost';\n    $cfg['Servers'][$i]['host'] = $dbserver;\n\n    if (!empty($dbport) || $dbserver != 'localhost') {\n        $cfg['Servers'][$i]['connect_type'] = 'tcp';\n        $cfg['Servers'][$i]['port'] = $dbport;\n    }\n    \/\/$cfg['Servers'][$i]['compress'] = false;\n    \/* Optional: User for advanced features *\/\n    $cfg['Servers'][$i]['controluser'] = $dbuser;\n    $cfg['Servers'][$i]['controlpass'] = $dbpass;\n    \/* Optional: Advanced phpMyAdmin features *\/\n    $cfg['Servers'][$i]['pmadb'] = $dbname;\n    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';\n    $cfg['Servers'][$i]['relation'] = 'pma__relation';\n    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';\n    $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';\n    $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';\n    $cfg['Servers'][$i]['column_info'] = 'pma__column_info';\n    $cfg['Servers'][$i]['history'] = 'pma__history';\n    $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';\n    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';\n    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';\n    $cfg['Servers'][$i]['recent'] = 'pma__recent';\n    $cfg['Servers'][$i]['favorite'] = 'pma__favorite';\n    $cfg['Servers'][$i]['users'] = 'pma__users';\n    $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';\n    $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';\n    $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';\n    $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';\n    $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';\n    $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';\n\n    \/* Uncomment the following to enable logging in to passwordless accounts,\n     * after taking note of the associated security risks. *\/\n    \/\/ $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;\n\n    \/* Advance to next server for rest of config *\/\n    $i++;\n}\n\n\/* Authentication type *\/\n\/\/$cfg['Servers'][$i]['auth_type'] = 'cookie';\n\/* Server parameters *\/\n\/\/$cfg['Servers'][$i]['host'] = 'localhost';\n\/\/$cfg['Servers'][$i]['connect_type'] = 'tcp';\n\/\/$cfg['Servers'][$i]['compress'] = false;\n\/* Uncomment the following to enable logging in to passwordless accounts,\n * after taking note of the associated security risks. *\/\n\/\/ $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;\n\n\/**\n * phpMyAdmin configuration storage settings.\n *\/\n\n\/* User used to manipulate with storage *\/\n\/\/ $cfg['Servers'][$i]['controlhost'] = '';\n\/\/ $cfg['Servers'][$i]['controlport'] = '';\n\/\/ $cfg['Servers'][$i]['controluser'] = 'pma';\n\/\/ $cfg['Servers'][$i]['controlpass'] = 'pmapass';\n\n\/* Storage database and tables *\/\n\/\/ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';\n\/\/ $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';\n\/\/ $cfg['Servers'][$i]['relation'] = 'pma__relation';\n\/\/ $cfg['Servers'][$i]['table_info'] = 'pma__table_info';\n\/\/ $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';\n\/\/ $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';\n\/\/ $cfg['Servers'][$i]['column_info'] = 'pma__column_info';\n\/\/ $cfg['Servers'][$i]['history'] = 'pma__history';\n\/\/ $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';\n\/\/ $cfg['Servers'][$i]['tracking'] = 'pma__tracking';\n\/\/ $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';\n\/\/ $cfg['Servers'][$i]['recent'] = 'pma__recent';\n\/\/ $cfg['Servers'][$i]['favorite'] = 'pma__favorite';\n\/\/ $cfg['Servers'][$i]['users'] = 'pma__users';\n\/\/ $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';\n\/\/ $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';\n\/\/ $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';\n\/\/ $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';\n\/\/ $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';\n\/\/ $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';\n\n\/*\n * End of servers configuration\n *\/\n\n\/*\n * Directories for saving\/loading files from server\n *\/\n$cfg['UploadDir'] = '';\n$cfg['SaveDir'] = '';\n\n\/* Support additional configurations *\/\nforeach (glob('\/etc\/phpmyadmin\/conf.d\/*.php') as $filename)\n{\n    include($filename);\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restart-apache-http-service\">Restart Apache HTTP Service<\/h3>\n\n\n\n<p>Confirm that Apache configurations are syntactically correct;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apachectl -t<\/code><\/pre>\n\n\n\n<p>Ensure the output is, <strong>Syntax OK<\/strong>.<\/p>\n\n\n\n<p>The restart;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"open-http-https-port-on-firewall\">Open HTTP\/HTTPS port on Firewall<\/h3>\n\n\n\n<p>Allow Apache on UFW for external access.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ufw allow \"WWW Full\"<\/pre>\n\n\n\n<p>You can use Iptables or firewalld if you want.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-php-my-admin-on-ubuntu-24-04\">Accessing phpMyAdmin on Ubuntu 24.04<\/h3>\n\n\n\n<p>You can now access phpMyAdmin from the browser using the address, <code><strong>http:\/\/server-host-name_or_IP\/phpmyadmin<\/strong><\/code>.<\/p>\n\n\n\n<p>Login using your database root user credentials or the user with access to only specific databases.<\/p>\n\n\n\n<p>To use root use for login, you need to enable MariaDB\/MySQL password based authentication;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-mariadb-11-on-ubuntu-24-04\/#enable-maria-db-password-authentication\" target=\"_blank\" rel=\"noreferrer noopener\">Enable MariaDB password Authentication<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1111\" height=\"662\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-login-page-debian.png\" alt=\"Install phpMyAdmin on Ubuntu 24.04\" class=\"wp-image-17246\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-login-page-debian.png?v=1686770917 1111w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-login-page-debian-768x458.png?v=1686770917 768w\" sizes=\"(max-width: 1111px) 100vw, 1111px\" \/><\/figure>\n\n\n\n<p>Upon successful login, you get to phpMyAdmin dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1621\" height=\"849\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/05\/phymyadmin-dashboard-ubuntu-24.04.png?v=1715579536\" alt=\"phpmyadmin on ubuntu 24.04\" class=\"wp-image-22537\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/05\/phymyadmin-dashboard-ubuntu-24.04.png?v=1715579536 1621w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/05\/phymyadmin-dashboard-ubuntu-24.04-768x402.png?v=1715579536 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/05\/phymyadmin-dashboard-ubuntu-24.04-1536x804.png?v=1715579536 1536w\" sizes=\"(max-width: 1621px) 100vw, 1621px\" \/><\/figure>\n\n\n\n<p>You have successfully installed and setup phpMyAdmin on Ubuntu 24.04. You can now be able to administer your MySQL or MariaDB from web.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install phpMyAdmin on Ubuntu 24.04. phpMyAdmin is a free and opensource application written in PHP<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-22522","post","type-post","status-publish","format-standard","hentry","category-howtos","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22522"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=22522"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22522\/revisions"}],"predecessor-version":[{"id":22538,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22522\/revisions\/22538"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=22522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=22522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=22522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}