File Structure
Database configuration is located at:plugins/BetterHud/database.yml
Configuration Options
database.yml
Storage type. Options:
yml- Local YAML filesmysql- MySQL database
MySQL Settings
MySQL server hostname or IP address
Database name
MySQL username
MySQL password
YAML Storage (Default)
Simple file-based storage for small servers:plugins/BetterHud/players/
Recommended for: Single servers, small player counts (under 1000 players)
MySQL Storage
Database storage for large servers and networks:database.yml
Recommended for: Large servers, multi-server networks, player counts over 1000
MySQL Setup
Network Setup
For multi-server networks, all servers can share one MySQL database:Migration
YAML to MySQL
MySQL to YAML
Performance
YAML Storage
- ✅ Simple setup
- ✅ No external dependencies
- ❌ Slower with many players
- ❌ No network sync
MySQL Storage
- ✅ Fast with many players
- ✅ Network synchronization
- ✅ Better reliability
- ❌ Requires MySQL server
- ❌ More complex setup
Troubleshooting
Connection failed
Connection failed
Check MySQL is running and credentials are correct:
Permission denied
Permission denied
Grant proper privileges to the MySQL user:
Player data not saving
Player data not saving
Check the
auto-save-time setting in config.yml:See Also
Main Config
Configure auto-save intervals
API Reference
DatabaseManager API
HudPlayer
Player data methods
Troubleshooting
Common database issues
