Console9

How to locate the MariaDB error log in XAMPP

Find the MariaDB (MySQL) error log file in XAMPP on Windows to diagnose database startup failures, query errors, and connection issues.

Find the MariaDB (MySQL) error log file in XAMPP on Windows to diagnose database startup failures, shutdown errors, and query problems.

Prerequisites

Step-by-Step: Locate the MariaDB Error Log in XAMPP

  1. Open the XAMPP installation directory. The default path on Windows is C:\xampp.

  2. Navigate to the MariaDB data directory at C:\xampp\mysql\data\.

  3. Locate the file named mysql_error.log. The full default path is C:\xampp\mysql\data\mysql_error.log.

    XAMPP MySQL error log file location

  4. Open mysql_error.log in a text editor. The most recent entries appear at the bottom of the file. Error messages include timestamps, error codes, and descriptions of the issue.

How to Verify the MariaDB Error Log Location in XAMPP

Open the MariaDB configuration file at C:\xampp\mysql\bin\my.ini. Search for the log-error directive. The value shows the file path where MariaDB writes error log entries. If the log-error directive is not set, MariaDB writes errors to the default location in the data directory.

Common Issues When Locating the MariaDB Error Log in XAMPP

The error log file does not exist.MariaDB creates the error log file on first startup. Start MariaDB from the XAMPP Control Panel to generate the file.

The error log is empty.MariaDB had no errors to record. The log populates when MariaDB encounters startup failures, connection errors, or query problems. See XAMPP: MySQL shutdown unexpectedlyfor common errors that generate log entries.