データベース設定
FeedbackPulse SaaS uses MySQL or MariaDB as its primary database.
✅ Supported データベースs
| データベース | Version | Status |
|---|---|---|
| MySQL | 8.0+ | ✅ Fully supported (recommended) |
| MariaDB | 10.6+ | ✅ Fully supported |
| PostgreSQL | 15+ | ⚠️ Experimental (migrations may need adjustment) |
| SQLite | 3.35+ | ⚠️ Development only (not for production) |
🔧 Creating the データベース
Before running the installer:
-- Connect to MySQL
mysql -u root -p
-- Create database with proper character set
CREATE DATABASE feedbackpulse
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
-- Create a dedicated user (recommended for security)
CREATE USER 'feedbackpulse'@'localhost'
IDENTIFIED BY 'your_strong_password_here';
-- Grant permissions
GRANT ALL PRIVILEGES ON feedbackpulse.*
TO 'feedbackpulse'@'localhost';
FLUSH PRIVILEGES;
EXIT;
⚠️ Why
utf8mb4? It supports the full Unicode character set including emojis. Customer feedback often contains emojis, so this is important!
⚙️ .env 設定
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=feedbackpulse
DB_USERNAME=feedbackpulse
DB_PASSWORD=your_strong_password_here
Common Gotchas
| Issue | Solution |
|---|---|
SQLSTATE[HY000] [2002] Connection refused | Use 127.0.0.1 instead of localhost |
SQLSTATE[HY000] [1045] Access denied | Check username/password, ensure user has privileges |
SQLSTATE[42S01] Table already exists | データベース wasn't empty. Drop and recreate, or use --force flag |
Emoji characters showing as ???? | データベース charset must be utf8mb4, not utf8 |
🔍 MySQL Performance Tuning
For production servers with many tenants, optimize MySQL:
# /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
# InnoDB buffer pool (set to 50-70% of available RAM)
innodb_buffer_pool_size = 1G
# Log file size
innodb_log_file_size = 256M
# Max connections (increase for high-traffic platforms)
max_connections = 200
# Query cache (disable in MySQL 8.0+, it's deprecated)
query_cache_type = 0
# Slow query log (for debugging performance issues)
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 2
Restart MySQL:
sudo systemctl restart mysql
💾 Backup & Restore
Using the Admin Panel
FeedbackPulse has a built-in backup feature:
- へ移動
Admin → バックアップ - Click Create Backup
- Download the
.sql.gzfile
Manual Backup
mysqldump -u feedbackpulse -p feedbackpulse | gzip > backup_$(date +%Y%m%d_%H%M%S).sql.gz
Restore
gunzip < backup_20240101_120000.sql.gz | mysql -u feedbackpulse -p feedbackpulse