Informática y Software Práctico

Common XAMPP Errors Troubleshooting: A Practical Guide

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

Common XAMPP Errors and How to Fix Them: A Practical Guide

XAMPP is a widely used local development environment for testing web applications with Apache, MySQL, PHP, and Perl. Despite its popularity, users often run into errors that interrupt their workflow. In this article, we’ll explore the most common issues and how to fix them effectively, without resorting to generic solutions.

Error: Apache won’t start (port 80 in use)

One of the most frequent problems is that Apache won’t start because port 80 is being used by another program, such as Skype, IIS, or VMware. To fix it, first identify the process using the port with the command netstat -ano | findstr :80 on Windows. Then you can stop that process or change Apache’s listening port. To change the port, edit the httpd.conf file in Apache’s conf folder and change the lines Listen 80 and ServerName localhost:80 to Listen 8080 and ServerName localhost:8080. Save and restart Apache. Remember to access http://localhost:8080.

Error: MySQL won’t start (port 3306 in use)

Similar to the previous case, MySQL may fail if port 3306 is being used by another instance of MySQL or MariaDB. Check with netstat -ano | findstr :3306 and terminate the conflicting process. If you need to change the port, edit my.ini in the mysqlbin folder and update port = 3306 to another value, for example 3307. Don’t forget to adjust your applications’ configuration so they point to the new port.

Error: “Access denied for user ‘root’@’localhost'”

This error occurs when the root password in MySQL doesn’t match the one configured in phpMyAdmin or in your application. To reset it, stop MySQL, open a console as administrator, and run mysqld –skip-grant-tables. Then, in another console, log in with mysql -u root and run UPDATE mysql.user SET authentication_string=PASSWORD(‘new_password’) WHERE User=’root’; followed by FLUSH PRIVILEGES;. Restart MySQL and update the password in phpMyAdmin’s config.inc.php.

Error: “The Apache service named reported the following error:” in Event Viewer

This generic message usually indicates a problem with Apache’s configuration, such as a module that failed to load or an incorrect directive. Check the error.log file in apachelogs for details. It’s often caused by a mistyped line in httpd.conf or a missing Visual C++ Redistributable. Install the version required by your XAMPP version and verify the syntax with httpd -t from the command line.

Error: phpMyAdmin shows “#1045 – Access denied for user ‘root’@’localhost'”

In addition to the password error, this failure can occur if the root user lacks privileges or if authentication changed in MySQL 8. Check the config.inc.php file and make sure $cfg[‘Servers’][$i][‘auth_type’] is set to ‘cookie’ to allow manual login. If it persists, create a new user with privileges and update the configuration.

Error: “Object not found” or “404” when accessing a local project

This error indicates that Apache can’t find the requested file. Verify that the project is inside the htdocs folder and that the URL matches the path. If you use friendly URLs, make sure the mod_rewrite module is enabled and that the .htaccess file has the correct rules. Also check the DocumentRoot directive in httpd.conf.

Error: “MySQL shutdown unexpectedly”

This failure is usually caused by corrupted data files in mysqldata. One solution is to restore a backup of the data folder or, if you don’t have one, rename the data folder to data_old and copy the backup folder (if it exists) to data. You can also try repairing the tables with myisamchk or innodb_force_recovery in my.ini.

These are just some of the most common errors. The key is to review the logs (Apache’s error.log and mysql_error.log) and apply configuration changes carefully. With these guidelines, you can keep your XAMPP environment running and focus on development.