Database Setup
NexAuth supports multiple database backends. Choose the one that best fits your server size and infrastructure.Supported Database Types
| Database | Best For | Setup Complexity | Performance |
|---|---|---|---|
| SQLite | Small servers, development | Easy | Good for small scale |
| MySQL/MariaDB | Medium to large servers | Medium | Excellent performance |
| PostgreSQL | Large servers, enterprises | Medium | Excellent performance |
- Tab Title
- Tab Title
- Tab Title
Perfect for small servers and development setups. No additional services required.
Configuration
Database Location
The database file will be created at:- Linux:
/path/to/server/plugins/NexAuth/nexauth.db - Windows:
\path\to\server\plugins\NexAuth\nexauth.db
Advantages
- ✅ No setup required
- ✅ No additional services
- ✅ Easy to backup (just copy the .db file)
- ✅ Good for small servers (< 100 players)
Disadvantages
- ❌ Not recommended for large servers
- ❌ Single file can become fragmented
- ❌ No concurrent connection optimization
SQLite is perfect for development, testing, and small production servers with less than 100 concurrent players.
Database Migration
Migrating from SQLite to MySQL
- Stop your server
- Install MySQL and create database/user
- Modify your config to use MySQL
- Start server - NexAuth will automatically migrate data
Manual Migration (if needed)
Performance Optimization
MySQL/MariaDB Optimizations
PostgreSQL Optimizations
Backup Strategies
- Tab Title
- Tab Title
- Tab Title
Troubleshooting Database Issues
Common Connection Problems
”Access Denied” Errors
Database Connection Timeout
- Check if database service is running
- Verify connection details in config
- Increase
connect-timeoutsetting - Check firewall settings
Table Not Found
- Database might not be created yet
- Check user has CREATE permissions
- Look for error logs during startup
Performance Issues
High CPU Usage
- Increase connection pool size
- Add more indexes
- Check for slow queries
- Consider SSD storage
Memory Issues
- Adjust connection pool size
- Monitor database server memory usage
- Consider database server upgrades
Connection Security
MySQL Security Recommendations
PostgreSQL Security Recommendations
Monitoring Database Health
MySQL/MariaDB Monitoring
PostgreSQL Monitoring
Next Steps
After setting up your database:- 📖 First Run Configuration for initial plugin setup
- 📖 Installation Guides for deployment options
- 📖 Performance optimization for your specific use case
- 📖 Advanced database configurations (coming soon)

