I ran into an issue where MariaDB in XAMPP refused to start and showed this error:
Table '.\mysql\proxies_priv' is marked as crashed and last (automatic?) repair failed
Fatal error: Can't open and lock privilege tables
Repairing with mysql_upgrade didn’t work, and trying to run aria_chk directly gave:
aria_chk.exe: Got error 'Can't find file' when trying to use aria_log_control
You don't have permission to use '*.MAI'
**Steps that fixed it:**
1. Open a command prompt in C:\xampp\mysql
2. Repair crashed Aria tables using aria_chk.exe. For example:
3. If a table fails due to small sort buffer (e.g., columns_priv.MAI), run safe recover with a larger buffer:
bin\aria_chk.exe -r -o --sort_buffer_size=256M data\mysql\columns_priv.MAI
If needed, stronger version:
bin\aria_chk.exe -r -o -f --sort_buffer_size=512M data\mysql\columns_priv.MAI
4. Delete old Aria log files to reset the engine:
C:\xampp\mysql\data\aria_log.*
C:\xampp\mysql\data\aria_log_control
5. Start MySQL via XAMPP. MariaDB should start normally.
*Why this happens:*
XAMPP sometimes crashes while MariaDB updates privilege tables. The .MAI files (Aria storage engine) get corrupted, preventing the server from starting. Since MariaDB cannot open mysql.* system tables, it shuts down.
**Summary:**
If MariaDB won’t start because proxies_priv, columns_priv, or other .MAI system tables are corrupted:
- Use aria_chk.exe from XAMPP’s mysql\bin
- Repair the specific .MAI files in mysql\data\mysql
- Use -o or a larger --sort_buffer_size if default repair fails
This restores system tables and allows MariaDB to start normally.