Informática y Software Práctico

Troubleshooting XAMPP Errors: Practical and Complete Guide

Post actualizado el día October 24, 2026 by DeiviSanzPlay

How to fix the most common XAMPP failures

XAMPP has become the preferred local development environment for those who work with PHP and MySQL. However, it is not exempt from setbacks: occupied ports, services that won’t start, phpMyAdmin access errors, or permission denied are issues that appear frequently. This guide gathers the most common causes and how to fix them without reinstalling the entire package from scratch.

Apache won’t start: the port conflict

The message “Apache shutdown unexpectedly” usually indicates that port 80 or port 443 is being used by another program. Skype, IIS, or some VMware services are the usual suspects. The quick check is done from the console with netstat -ano | findstr :80; the final number corresponds to the PID of the process blocking the port.

If you don’t need that other service, simply stop it. If you prefer to keep it running, edit the httpd.conf file (located in xamppapacheconf) and replace Listen 80 with Listen 8080, as well as ServerName localhost:8080. Remember that afterward you will need to access your projects as http://localhost:8080/.

MySQL/MariaDB stops on startup

When the control panel shows that MySQL starts and shuts down immediately, there is almost always a previous MySQL service installed on the system, or the data files are corrupted. Check the mysql_error.log file inside xamppmysqldata: the final lines reveal the exact reason.

A frequent cause is port 3306 being occupied. Change port=3306 to port=3307 in my.ini and also update the PHP configuration in php.ini or in your application’s connection file. If the problem persists, rename the data folder as a backup and run mysql_install_db to regenerate the system tables.

“Access denied for user root” error

This failure appears when the MySQL root user’s password does not match the one configured in phpMyAdmin or in your script. The solution is to edit config.inc.php in xamppphpMyAdmin and adjust the line $cfg[‘Servers’][$i][‘password’]. If you forgot the password, stop MySQL, open a console as administrator, and start the service with the –skip-grant-tables option; from there you can reset it with ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘new_password’;.

phpMyAdmin shows “The mysqli extension is missing”

The mysqli extension is disabled in some installations. Open php.ini, locate the line ;extension=mysqli, and remove the leading semicolon. Save the file and restart Apache from the XAMPP panel. Check the result with an info.php file containing <?php phpinfo(); ?>.

403 Forbidden error or permission denied

Windows systems with user account control can prevent access to htdocs. Verify that the folder has read permissions for the Everyone group. On macOS and Linux, run chmod -R 755 on the directory and make sure the owner matches the user running Apache. Also, check the Require local directive in httpd.conf: if you access from another computer on the network, change it to Require all granted.

Recommendations to prevent future failures

  • Run the control panel with administrator privileges.
  • Stop the services before shutting down the computer to avoid data corruption.
  • Keep the XAMPP version updated and make periodic backups of the databases.
  • Check the Apache and MySQL logs for any strange behavior; they almost always point to the root cause.

With these guidelines, most XAMPP errors are resolved in a few minutes and without the need for a clean installation.