Database Server
MariaDB Configuration
Edit and validate the live database configuration. This page is shown only when the database service is installed. Access: root.
What you’re editing
/etc/my.cnf
— the primary config for MariaDB client and server.- Controls ports, modes, character sets, caches/buffers, logging, and InnoDB behavior.
Editor & apply flow
- Click “Validate & Apply Changes” to save and test.
- A backup of the current file is created as
/etc/my.cnf.bak
before changes are applied. - Syntax/option check is run; on error, your changes are rolled back and the backup is restored.
- If validation passes, MariaDB is restarted to load the new settings.
- File size limit: 1 MB (for safety).
Good defaults to consider
- Character set: server-side
character-set-server=utf8mb4
andcollation-server=utf8mb4_unicode_ci
. - InnoDB: size buffers sensibly for RAM (
innodb_buffer_pool_size
,innodb_log_file_size
). Avoid oversizing. - Logging: enable slow query log for tuning; keep general log off in production.
- Security: bind to required interfaces; don’t expose port 3306 publicly unless intended.
Typical tweaks
- Connections:
max_connections
sized to workload and PHP-FPM pool limits. - Temp tables:
tmp_table_size
andmax_heap_table_size
matched. - Query cache: keep disabled on modern MariaDB for better concurrency (if present in your version).
Troubleshooting
- Validation failed: the error output points to invalid options or typos. Fix and re-apply; the previous config is already restored.
- Restart failed: check service logs and revert to the backup if needed.
- Won’t start after manual edits elsewhere: use this editor to restore the last known good content, validate, and restart.
Caution: Database config changes impact all applications immediately. Schedule a maintenance window for high-traffic servers and back up databases and
/etc/my.cnf
beforehand.