{"id":49737,"date":"2025-01-13T12:30:00","date_gmt":"2025-01-13T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=49737"},"modified":"2024-12-10T04:20:41","modified_gmt":"2024-12-10T10:20:41","slug":"how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/","title":{"rendered":"How to install and secure phpMyAdmin on Ubuntu 24.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\" alt=\"How to install phpMyAdmin on Ubuntu 24.04\" class=\"wp-image-49747\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04-300x169.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04-150x84.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04-768x432.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Welcome to our guide on setting up phpMyAdmin on Ubuntu 24.04! Efficiently managing databases is critical. phpMyAdmin is a popular open-source tool that provides a user-friendly interface to manage MySQL or MariaDB databases with ease. This tutorial is tailored for both tech enthusiasts and IT professionals, offering a simple, step-by-step process to install phpMyAdmin on your Ubuntu 24.04 system. Whether you&#8217;re a developer, database administrator, or someone managing a personal project, this guide will help you streamline your database management.<\/p>\n\n\n\n<p>Follow each step carefully, and feel free to refer back to this guide whenever needed. Let\u2019s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f174a0ba2d1\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f174a0ba2d1\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Prerequisites\" >Prerequisites:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-1-Update-System-Packages\" >Step 1. Update System Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-2-Install-Web-Server\" >Step 2. Install Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-3-Install-MySQL\" >Step 3. Install MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-4-Install-PHP\" >Step 4. Install PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-5-Install-phpMyAdmin\" >Step 5. Install phpMyAdmin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-6-Create-a-MySQL-User\" >Step 6. Create a MySQL User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#Step-7-Create-Virtual-Host\" >Step 7. Create Virtual Host<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An Ubuntu 24.04 VPS<\/li>\n\n\n\n<li>At least 2GB of RAM<\/li>\n\n\n\n<li>SSH root access or a system user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-1-Update-System-Packages\"><\/span>Step 1. Update System Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To start, log in to your Ubuntu 24.04 VPS using SSH:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh root@IP_Address -p Port_number<\/code><\/pre>\n\n\n\n<p>Replace &#8216;IP_Address&#8217; and &#8216;Port_number&#8217; with your server&#8217;s actual IP address and SSH port number. If needed, replace &#8216;root&#8217; with the username of your sudo account.<\/p>\n\n\n\n<p>Once logged in, you must make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update -y &amp;&amp; sudo apt-get upgrade -y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-2-Install-Web-Server\"><\/span>Step 2. Install Web Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this tutorial, we will use Apache as the web server, but you can also opt for Nginx if you prefer. Apache, a powerful and widely used web server, is known for its flexibility and extensive module support. It is a reliable choice for hosting websites and web applications. Use the following command to install the Apache web server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apache2<\/code><\/pre>\n\n\n\n<p>Once installed, we can enable Apache to start automatically at boot time by executing the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable apache2<\/code><\/pre>\n\n\n\n<p>Next, start Apache using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start apache2<\/code><\/pre>\n\n\n\n<p>If everything works as expected, you can check the status with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status apache2<\/code><\/pre>\n\n\n\n<p>Here\u2019s how the output should look:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl status apache2\n\n\u25cf apache2.service - The Apache HTTP Server\n\n     Loaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)\n\n     Active: active (running) since Tue 2024-12-03 15:37:22 CST; 18h ago\n\n       Docs: https:\/\/httpd.apache.org\/docs\/2.4\/\n\n    Process: 14505 ExecStart=\/usr\/sbin\/apachectl start (code=exited, status=0\/SUCCESS)    \n\n    Process: 17106 ExecReload=\/usr\/sbin\/apachectl graceful (code=exited, status=0\/SUCCESS)\n\n   Main PID: 14509 (apache2)\n\n      Tasks: 8 (limit: 4564)\n\n     Memory: 17.8M\n\n        CPU: 7.656s\n\n     CGroup: \/system.slice\/apache2.service\n\n             \u251c\u250014509 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017119 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017120 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017121 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017122 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017123 \/usr\/sbin\/apache2 -k start\n\n             \u251c\u250017141 \/usr\/sbin\/apache2 -k start\n\n             \u2514\u250017564 \/usr\/sbin\/apache2 -k start<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-3-Install-MySQL\"><\/span>Step 3. Install MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>MySQL is an open-source relational database management system. Execute the following command to install MySQL on Ubuntu 24.04.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install mysql-server<\/code><\/pre>\n\n\n\n<p>Once installed, we can enable MySQL to start automatically at boot time by executing the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable mysql<\/code><\/pre>\n\n\n\n<p>Next, start MySQL using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start mysql<\/code><\/pre>\n\n\n\n<p>If everything works as expected, you can check the status with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status mysql<\/code><\/pre>\n\n\n\n<p>Here\u2019s how the output should look:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl status mysql\n\n\u25cf mysql.service - MySQL Community Server\n\n     Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset: enabled)\n\n     Active: active (running) since Tue 2024-12-03 15:52:33 CST; 18h ago\n\n    Process: 14694 ExecStartPre=\/usr\/share\/mysql\/mysql-systemd-start pre (code=exited, status=0\/SUCCESS)\n\n   Main PID: 14702 (mysqld)\n\n     Status: \"Server is operational\"\n\n      Tasks: 39 (limit: 4564)\n\n     Memory: 548.3M\n\n        CPU: 8min 45.011s\n\n     CGroup: \/system.slice\/mysql.service\n\n             \u2514\u250014702 \/usr\/sbin\/mysqld<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-4-Install-PHP\"><\/span>Step 4. Install PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are two main methods to install PHP on Ubuntu. We will use the standard approach and install PHP from the Ubuntu repositories using the APT package manager, as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php libapache2-mod-php php-mysql<\/code><\/pre>\n\n\n\n<p>However, it is important to note that this method does not provide the latest version of PHP. Currently, the repository only provides PHP 8.3.<\/p>\n\n\n\n<p>Next, we will install PHP extensions with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php-{cli,mbstring,zip,gd,curl,json}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-5-Install-phpMyAdmin\"><\/span>Step 5. Install phpMyAdmin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After installing the necessary system dependencies, you can use APT to install phpMyAdmin from the default Ubuntu repositories using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install phpmyadmin<\/code><\/pre>\n\n\n\n<p>To configure your installation correctly, follow these prompts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select apache2 as the server during the server selection step.<\/li>\n\n\n\n<li>Choose Yes when asked whether to use dbconfig-common to set up the database.<\/li>\n\n\n\n<li>Provide and confirm a MySQL application password for the phpMyAdmin database when prompted.<\/li>\n<\/ul>\n\n\n\n<p>During the installation, the phpMyAdmin Apache configuration file is placed in the \/etc\/apache2\/conf-enabled\/ directory, where it is automatically loaded. To complete the setup of Apache and PHP for phpMyAdmin, you need to manually enable the mbstring PHP extension. This can be done by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo phpenmod mbstring<\/code><\/pre>\n\n\n\n<p>Then restart the apache2 service to apply the changes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl reload apache2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-6-Create-a-MySQL-User\"><\/span>Step 6. Create a MySQL User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To log in to our MySQL system we use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> mysql -u root -p<\/code><\/pre>\n\n\n\n<p>By executing this command we tell the MySQL client to log us in with the root user and to prompt us for the user\u2019s password.<\/p>\n\n\n\n<p>Create a new MySQL user with the following query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'DatabaseUser'@'localhost' IDENTIFIED BY 'YourStrongPassword';<\/code><\/pre>\n\n\n\n<p>Ensure that you replace the value of the &#8220;YourStrongPassword&#8221; key above with a more secure password and &#8220;DatabaseUser&#8221; with your desired username.<\/p>\n\n\n\n<p>After creating a new user, you can assign various types of privileges depending on their role and required access. MySQL offers a range of privileges, including:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALL PRIVILEGES: Grants the user full access to all databases and tables.\n\nSELECT: Allows the user to retrieve data from tables.\n\nINSERT: Enables the user to add new rows to tables.\n\nUPDATE: Permits the user to modify existing data in tables.\n\nDELETE: Allows the user to remove rows from tables.\n\nCREATE: Enables the user to create new databases and tables.\n\nDROP: Grants the ability to delete databases and tables.\n\nGRANT OPTION: Allows the user to grant or revoke privileges from other users.<\/code><\/pre>\n\n\n\n<p>Carefully assign privileges to ensure that the user has the necessary access without compromising the security of your database.<\/p>\n\n\n\n<p>Granting permissions is typically done in this format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT &lt;permission type&gt; ON &lt;database&gt;.&lt;table&gt; TO '&lt;username&gt;'@'&lt;host&gt;';<\/code><\/pre>\n\n\n\n<p>For our new set of permissions to take effect we need to reload all the privileges:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>Finally, we can test our new user by accessing phpMyAdmin at the URL http:\/\/YOUR_SERVER_IP\/phpmyadmin. You should see the following page:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-7-Create-Virtual-Host\"><\/span>Step 7. Create Virtual Host<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you want to use a domain name instead of your server&#8217;s IP address, you need to create an Apache virtual host:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/apache2\/sites-available\/phpmyadmin.conf<\/code><\/pre>\n\n\n\n<p>Insert the following configuration into the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n\n    ServerAdmin admin@mydomain.com\n\n    ServerName phpmyadmin.mydomain.com\n\n    DocumentRoot \/usr\/share\/phpmyadmin\n\n&lt;Directory \/usr\/share\/phpmyadmin&gt;\n\n    Options SymLinksIfOwnerMatch\n\n    DirectoryIndex index.php\n\n    # limit libapache2-mod-php to files and directories necessary by pma\n\n    &lt;IfModule mod_php7.c&gt;\n\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n\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\n    &lt;\/IfModule&gt;\n\n    # PHP 8+\n\n    &lt;IfModule mod_php.c&gt;\n\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n\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\n    &lt;\/IfModule&gt;\n\n&lt;\/Directory&gt;\n\n# Disallow web access to directories that don't need it\n\n&lt;Directory \/usr\/share\/phpmyadmin\/templates&gt;\n\n    Require all denied\n\n&lt;\/Directory&gt;\n\n&lt;Directory \/usr\/share\/phpmyadmin\/libraries&gt;\n\n    Require all denied\n\n&lt;\/Directory&gt;\n\n    ErrorLog ${APACHE_LOG_DIR}\/phpmyadmin_error.log\n\n    CustomLog ${APACHE_LOG_DIR}\/phpmyadmin_access.log combined\n\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p>Be sure to update &#8220;phpmyadmin.mydomain.com&#8221; with your domain name.<\/p>\n\n\n\n<p>Save and close the file, then enable the site and reload the Apache2 service to apply the changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2ensite phpmyadmin\n\nsystemctl reload apache2<\/code><\/pre>\n\n\n\n<p>You can now access phpMyAdmin using your domain name at http:\/\/phpmyadmin.mydomain.com and begin working on your databases. For additional details about phpMyAdmin, its features, and configuration, refer to their official documentation.<\/p>\n\n\n\n<p>Of course, you don\u2019t have to install phpMyAdmin on Ubuntu 24.04 if you use one of our <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install and configure phpMyAdmin on Ubuntu 24.04 for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p>If you liked this post on installing phpMyAdmin on Ubuntu 24.04, please share it with your friends or simply leave a comment in the comments section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our guide on setting up phpMyAdmin on Ubuntu 24.04! Efficiently managing databases is critical. phpMyAdmin is a popular &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to install and secure phpMyAdmin on Ubuntu 24.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#more-49737\" aria-label=\"Read more about How to install and secure phpMyAdmin on Ubuntu 24.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":49747,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1698],"tags":[1603,94,2136],"class_list":["post-49737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-how-to-install","tag-phpmyadmin","tag-ubuntu-24-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Install phpMyAdmin on Ubuntu 24.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to install and secure phpMyAdmin on Ubuntu 24.04 or have our Linux engineers take care of it for you.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install and secure phpMyAdmin on Ubuntu 24.04\" \/>\n<meta property=\"og:description\" content=\"How to install and secure phpMyAdmin on Ubuntu 24.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-13T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to install and secure phpMyAdmin on Ubuntu 24.04\",\"datePublished\":\"2025-01-13T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/\"},\"wordCount\":898,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\",\"keywords\":[\"how to install\",\"phpmyadmin\",\"Ubuntu 24.04\"],\"articleSection\":[\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/\",\"name\":\"Install phpMyAdmin on Ubuntu 24.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\",\"datePublished\":\"2025-01-13T18:30:00+00:00\",\"description\":\"Learn how to install and secure phpMyAdmin on Ubuntu 24.04 or have our Linux engineers take care of it for you.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp\",\"width\":1024,\"height\":576,\"caption\":\"How to install phpMyAdmin on Ubuntu 24.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install and secure phpMyAdmin on Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Install phpMyAdmin on Ubuntu 24.04 | RoseHosting","description":"Learn how to install and secure phpMyAdmin on Ubuntu 24.04 or have our Linux engineers take care of it for you.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/","og_locale":"en_US","og_type":"article","og_title":"How to install and secure phpMyAdmin on Ubuntu 24.04","og_description":"How to install and secure phpMyAdmin on Ubuntu 24.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2025-01-13T18:30:00+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to install and secure phpMyAdmin on Ubuntu 24.04","datePublished":"2025-01-13T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/"},"wordCount":898,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp","keywords":["how to install","phpmyadmin","Ubuntu 24.04"],"articleSection":["Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/","name":"Install phpMyAdmin on Ubuntu 24.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp","datePublished":"2025-01-13T18:30:00+00:00","description":"Learn how to install and secure phpMyAdmin on Ubuntu 24.04 or have our Linux engineers take care of it for you.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04.webp","width":1024,"height":576,"caption":"How to install phpMyAdmin on Ubuntu 24.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-phpmyadmin-on-ubuntu-24-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install and secure phpMyAdmin on Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/49737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=49737"}],"version-history":[{"count":9,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/49737\/revisions"}],"predecessor-version":[{"id":49748,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/49737\/revisions\/49748"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/49747"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=49737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=49737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=49737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}