{"id":843,"date":"2026-01-26T23:21:19","date_gmt":"2026-01-26T23:21:19","guid":{"rendered":"https:\/\/www.pofii.com\/blog\/?p=843"},"modified":"2026-01-26T23:29:48","modified_gmt":"2026-01-26T23:29:48","slug":"install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack","status":"publish","type":"post","link":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/","title":{"rendered":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#1_Update_the_server\" >1) Update the server<\/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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#2_Install_Apache_httpd\" >2) Install Apache (httpd)<\/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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#3_Install_MySQL_Community_Server_84_LTS_by_default\" >3) Install MySQL Community Server (8.4 LTS by default)<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#31_Add_the_MySQL_Yum_repo_EL9_vs_EL8\" >3.1 Add the MySQL Yum repo (EL9 vs EL8)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#32_Install_and_start_MySQL\" >3.2 Install and start MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#33_Set_root_password_and_secure_MySQL\" >3.3 Set root password and secure MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#Optional_Use_MySQL_80_instead_of_84\" >Optional: Use MySQL 8.0 instead of 8.4<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#4_Install_PHP_83_Remi_common_extensions\" >4) Install PHP 8.3 (Remi) + common extensions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#41_Enable_CRB_PowerTools_needed_for_EPEL_deps\" >4.1 Enable CRB \/ PowerTools (needed for EPEL deps)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#42_Install_EPEL_Remi_release_RPM\" >4.2 Install EPEL + Remi release RPM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#43_Enable_PHP_83_module_stream_and_install_PHP\" >4.3 Enable PHP 8.3 module stream and install PHP<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#5_Install_phpMyAdmin\" >5) Install phpMyAdmin<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#51_Allow_access_dont_leave_it_wide_open\" >5.1 Allow access (don\u2019t leave it wide open)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#6_Validate_the_stack\" >6) Validate the stack<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#61_Confirm_versions\" >6.1 Confirm versions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#62_Quick_PHP_test_page\" >6.2 Quick PHP test page<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#Troubleshooting\" >Troubleshooting<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#Apache_shows_PHP_code_instead_of_executing_it\" >Apache shows PHP code instead of executing it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#phpMyAdmin_403_Forbidden\" >phpMyAdmin 403 Forbidden<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#Cant_log_in_to_MySQL_root\" >Can\u2019t log in to MySQL root<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><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>Root or sudo access<\/li>\n\n\n\n<li>AlmaLinux\/Rocky <strong>8 or 9<\/strong><\/li>\n\n\n\n<li>Internet access to pull repositories\/packages<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Check your major version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/os-release\nrpm -E %rhel\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-update-the-server\"><span class=\"ez-toc-section\" id=\"1_Update_the_server\"><\/span>1) Update the server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y update\nsudo reboot\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-install-apache-httpd\"><span class=\"ez-toc-section\" id=\"2_Install_Apache_httpd\"><\/span>2) Install Apache (httpd)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install httpd\nsudo systemctl enable --now httpd\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open HTTP\/HTTPS in the firewall:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --permanent --add-service=http\nsudo firewall-cmd --permanent --add-service=https\nsudo firewall-cmd --reload\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Quick check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -I http:\/\/127.0.0.1\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-install-mysql-community-server-8-4-lts-by-default\"><span class=\"ez-toc-section\" id=\"3_Install_MySQL_Community_Server_84_LTS_by_default\"><\/span>3) Install MySQL Community Server (8.4 LTS by default)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Alma\/Rocky ship MariaDB in the base repos, so for <strong>Oracle MySQL<\/strong> you install the official MySQL repo RPM first. The current repo setup RPMs are published by MySQL (EL8\/EL9).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-1-add-the-mysql-yum-repo-el9-vs-el8\"><span class=\"ez-toc-section\" id=\"31_Add_the_MySQL_Yum_repo_EL9_vs_EL8\"><\/span>3.1 Add the MySQL Yum repo (EL9 vs EL8)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For EL9 (Alma\/Rocky 9):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install https:\/\/dev.mysql.com\/get\/mysql84-community-release-el9-2.noarch.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For EL8 (Alma\/Rocky 8):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install https:\/\/dev.mysql.com\/get\/mysql84-community-release-el8-2.noarch.rpm\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-2-install-and-start-mysql\"><span class=\"ez-toc-section\" id=\"32_Install_and_start_MySQL\"><\/span>3.2 Install and start MySQL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install mysql-community-server\nsudo systemctl enable --now mysqld\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-3-set-root-password-and-secure-mysql\"><span class=\"ez-toc-section\" id=\"33_Set_root_password_and_secure_MySQL\"><\/span>3.3 Set root password and secure MySQL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL generates a temporary root password and writes it to the error log; grab it like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo grep 'temporary password' \/var\/log\/mysqld.log\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql_secure_installation\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-optional-use-mysql-8-0-instead-of-8-4\"><span class=\"ez-toc-section\" id=\"Optional_Use_MySQL_80_instead_of_84\"><\/span>Optional: Use MySQL 8.0 instead of 8.4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL\u2019s Yum repo enables <strong>8.4 LTS<\/strong> by default; other series (like 8.0) are available as separate subrepos you can enable\/disable.<br>Edit <code>\/etc\/yum.repos.d\/mysql-community.repo<\/code>, disable the 8.4 repo, enable the 8.0 repo, then <code>dnf install mysql-community-server<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-4-install-php-8-3-remi-common-extensions\"><span class=\"ez-toc-section\" id=\"4_Install_PHP_83_Remi_common_extensions\"><\/span>4) Install PHP 8.3 (Remi) + common extensions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Remi\u2019s repo is the standard way to get a consistent PHP 8.3 on EL8\/EL9, and the exact flow is: install EPEL + Remi release RPM, enable CRB\/PowerTools, then switch the PHP module to <code>remi-8.3<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-1-enable-crb-powertools-needed-for-epel-deps\"><span class=\"ez-toc-section\" id=\"41_Enable_CRB_PowerTools_needed_for_EPEL_deps\"><\/span>4.1 Enable CRB \/ PowerTools (needed for EPEL deps)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>EL9:<\/strong> <code>crb<\/code><\/li>\n\n\n\n<li><strong>EL8:<\/strong> <code>powertools<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install dnf-plugins-core\n\n# EL9:\nsudo dnf config-manager --set-enabled crb\n\n# EL8:\nsudo dnf config-manager --set-enabled powertools\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-2-install-epel-remi-release-rpm\"><span class=\"ez-toc-section\" id=\"42_Install_EPEL_Remi_release_RPM\"><\/span>4.2 Install EPEL + Remi release RPM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EL9:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-9.noarch.rpm\nsudo dnf -y install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-9.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EL8:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm\nsudo dnf -y install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(Those are Remi\u2019s published install URLs for Alma\/Rocky 8\/9.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-3-enable-php-8-3-module-stream-and-install-php\"><span class=\"ez-toc-section\" id=\"43_Enable_PHP_83_module_stream_and_install_PHP\"><\/span>4.3 Enable PHP 8.3 module stream and install PHP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y module reset php\nsudo dnf -y module install php:remi-8.3\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install PHP + common modules for LAMP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install \\\n  php php-cli php-common php-opcache \\\n  php-mysqlnd \\\n  php-gd php-mbstring php-xml php-json php-zip php-curl php-intl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart httpd\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-5-install-phpmyadmin\"><span class=\"ez-toc-section\" id=\"5_Install_phpMyAdmin\"><\/span>5) Install phpMyAdmin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">phpMyAdmin is typically installed from <strong>EPEL<\/strong> on EL-family systems; once EPEL is enabled (and CRB\/PowerTools is on), the package install is straightforward.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y install phpmyadmin\nsudo systemctl restart httpd\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-1-allow-access-don-t-leave-it-wide-open\"><span class=\"ez-toc-section\" id=\"51_Allow_access_dont_leave_it_wide_open\"><\/span>5.1 Allow access (don\u2019t leave it wide open)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">EPEL\u2019s Apache config often restricts phpMyAdmin to localhost by default; edit the Apache config and allow only your IP (or your admin subnet).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Common location:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/httpd\/conf.d\/phpMyAdmin.conf\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Typical pattern (example: allow only your workstation IP):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Require ip 203.0.113.10\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reload:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl reload httpd\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Access it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>http:\/\/YOUR_SERVER_IP\/phpmyadmin<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-6-validate-the-stack\"><span class=\"ez-toc-section\" id=\"6_Validate_the_stack\"><\/span>6) Validate the stack<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-1-confirm-versions\"><span class=\"ez-toc-section\" id=\"61_Confirm_versions\"><\/span>6.1 Confirm versions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v\nmysql --version\nhttpd -v\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-2-quick-php-test-page\"><span class=\"ez-toc-section\" id=\"62_Quick_PHP_test_page\"><\/span>6.2 Quick PHP test page<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>echo '&lt;?php echo \"PHP OK\\n\"; ?&gt;' | sudo tee \/var\/www\/html\/health.php\ncurl -s http:\/\/127.0.0.1\/health.php\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(Optional) If you also want a <code>phpinfo()<\/code> page for debugging, Rocky\u2019s docs show the classic <code>info.php<\/code> method\u2014just don\u2019t leave it sitting there.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-troubleshooting\"><span class=\"ez-toc-section\" id=\"Troubleshooting\"><\/span>Troubleshooting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-apache-shows-php-code-instead-of-executing-it\"><span class=\"ez-toc-section\" id=\"Apache_shows_PHP_code_instead_of_executing_it\"><\/span>Apache shows PHP code instead of executing it<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify PHP is installed from the expected module stream: <code>sudo dnf module list php<\/code><\/li>\n\n\n\n<li>Restart Apache: <code>sudo systemctl restart httpd<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-phpmyadmin-403-forbidden\"><span class=\"ez-toc-section\" id=\"phpMyAdmin_403_Forbidden\"><\/span>phpMyAdmin 403 Forbidden<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You didn\u2019t allow your IP in <code>\/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/code>. Fix the <code>Require<\/code> rules, then: <code>sudo systemctl reload httpd<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-can-t-log-in-to-mysql-root\"><span class=\"ez-toc-section\" id=\"Cant_log_in_to_MySQL_root\"><\/span>Can\u2019t log in to MySQL root<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Re-check the generated temporary password: <code>sudo grep 'temporary password' \/var\/log\/mysqld.log<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 is dead (EOL was June 30, 2024).<br \/>\nAlmaLinux and Rocky Linux are supported, RHEL-compatible rebuilds, so if CentOS 7 were still alive, the overall LAMP install flow would look essentially the same.<\/p>\n","protected":false},"author":5,"featured_media":846,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[],"class_list":["post-843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)<\/title>\n<meta name=\"description\" content=\"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.\" \/>\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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)\" \/>\n<meta property=\"og:description\" content=\"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\" \/>\n<meta property=\"og:site_name\" content=\"Pofii Insights\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PofiiCOM\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-26T23:21:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-26T23:29:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1-1024x683.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Cavil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PofiiGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@PofiiGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Cavil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\"},\"author\":{\"name\":\"John Cavil\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873\"},\"headline\":\"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)\",\"datePublished\":\"2026-01-26T23:21:19+00:00\",\"dateModified\":\"2026-01-26T23:29:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\"},\"wordCount\":387,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png\",\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\",\"url\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\",\"name\":\"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)\",\"isPartOf\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png\",\"datePublished\":\"2026-01-26T23:21:19+00:00\",\"dateModified\":\"2026-01-26T23:29:48+00:00\",\"description\":\"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage\",\"url\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nl.pofii.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#website\",\"url\":\"https:\/\/www.pofii.com\/blog\/\",\"name\":\"Pofii\",\"description\":\"Success Simplified.\",\"publisher\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pofii.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\",\"name\":\"Pofii\",\"url\":\"https:\/\/www.pofii.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png\",\"width\":2079,\"height\":221,\"caption\":\"Pofii\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/PofiiCOM\",\"https:\/\/x.com\/PofiiGlobal\",\"https:\/\/www.instagram.com\/PofiiGlobal\",\"https:\/\/www.linkedin.com\/company\/Pofii\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873\",\"name\":\"John Cavil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png\",\"caption\":\"John Cavil\"},\"description\":\"WordPress Expert, Head of technical support at Pofii Ltd.\",\"sameAs\":[\"https:\/\/www.pofii.com\/blog\/author\/JohnC\"],\"url\":\"https:\/\/www.pofii.com\/blog\/author\/johnc\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)","description":"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.","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.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/","og_locale":"en_US","og_type":"article","og_title":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)","og_description":"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.","og_url":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/","og_site_name":"Pofii Insights","article_publisher":"https:\/\/www.facebook.com\/PofiiCOM","article_published_time":"2026-01-26T23:21:19+00:00","article_modified_time":"2026-01-26T23:29:48+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1-1024x683.png","type":"image\/png"}],"author":"John Cavil","twitter_card":"summary_large_image","twitter_creator":"@PofiiGlobal","twitter_site":"@PofiiGlobal","twitter_misc":{"Written by":"John Cavil","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#article","isPartOf":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/"},"author":{"name":"John Cavil","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873"},"headline":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)","datePublished":"2026-01-26T23:21:19+00:00","dateModified":"2026-01-26T23:29:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/"},"wordCount":387,"commentCount":0,"publisher":{"@id":"https:\/\/www.pofii.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/","url":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/","name":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)","isPartOf":{"@id":"https:\/\/www.pofii.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png","datePublished":"2026-01-26T23:21:19+00:00","dateModified":"2026-01-26T23:29:48+00:00","description":"Step-by-step LAMP guide for AlmaLinux\/Rocky: Apache + PHP 8.3 (Remi), MySQL Community Server, and phpMyAdmin, including firewall.","breadcrumb":{"@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#primaryimage","url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png","contentUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2026\/01\/installlinux-1.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.pofii.com\/blog\/install-php-8-3-mysql-and-apache-on-alma-rocky-linux-lamp-stack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nl.pofii.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install PHP 8.3, MySQL, phpMyAdmin, and Apache on Alma \/ Rocky Linux (LAMP Stack)"}]},{"@type":"WebSite","@id":"https:\/\/www.pofii.com\/blog\/#website","url":"https:\/\/www.pofii.com\/blog\/","name":"Pofii","description":"Success Simplified.","publisher":{"@id":"https:\/\/www.pofii.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pofii.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pofii.com\/blog\/#organization","name":"Pofii","url":"https:\/\/www.pofii.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png","contentUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png","width":2079,"height":221,"caption":"Pofii"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PofiiCOM","https:\/\/x.com\/PofiiGlobal","https:\/\/www.instagram.com\/PofiiGlobal","https:\/\/www.linkedin.com\/company\/Pofii"]},{"@type":"Person","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873","name":"John Cavil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png","contentUrl":"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png","caption":"John Cavil"},"description":"WordPress Expert, Head of technical support at Pofii Ltd.","sameAs":["https:\/\/www.pofii.com\/blog\/author\/JohnC"],"url":"https:\/\/www.pofii.com\/blog\/author\/johnc\/"}]}},"_links":{"self":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/comments?post=843"}],"version-history":[{"count":1,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/843\/revisions"}],"predecessor-version":[{"id":845,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/843\/revisions\/845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/media\/846"}],"wp:attachment":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/media?parent=843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/categories?post=843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/tags?post=843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}